xref: /linux/include/uapi/linux/atm_tcp.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells /* atm_tcp.h - Driver-specific declarations of the ATMTCP driver (for use by
3607ca46eSDavid Howells 	       driver-specific utilities) */
4607ca46eSDavid Howells 
5607ca46eSDavid Howells /* Written 1997-2000 by Werner Almesberger, EPFL LRC/ICA */
6607ca46eSDavid Howells 
7607ca46eSDavid Howells 
8607ca46eSDavid Howells #ifndef _UAPILINUX_ATM_TCP_H
9607ca46eSDavid Howells #define _UAPILINUX_ATM_TCP_H
10607ca46eSDavid Howells 
11607ca46eSDavid Howells #include <linux/atmapi.h>
12607ca46eSDavid Howells #include <linux/atm.h>
13607ca46eSDavid Howells #include <linux/atmioc.h>
14607ca46eSDavid Howells #include <linux/types.h>
15607ca46eSDavid Howells 
16607ca46eSDavid Howells 
17607ca46eSDavid Howells /*
18607ca46eSDavid Howells  * All values in struct atmtcp_hdr are in network byte order
19607ca46eSDavid Howells  */
20607ca46eSDavid Howells 
21607ca46eSDavid Howells struct atmtcp_hdr {
22607ca46eSDavid Howells 	__u16	vpi;
23607ca46eSDavid Howells 	__u16	vci;
24607ca46eSDavid Howells 	__u32	length;		/* ... of data part */
25607ca46eSDavid Howells };
26607ca46eSDavid Howells 
27607ca46eSDavid Howells /*
28607ca46eSDavid Howells  * All values in struct atmtcp_command are in host byte order
29607ca46eSDavid Howells  */
30607ca46eSDavid Howells 
31607ca46eSDavid Howells #define ATMTCP_HDR_MAGIC	(~0)	/* this length indicates a command */
32607ca46eSDavid Howells #define ATMTCP_CTRL_OPEN	1	/* request/reply */
33607ca46eSDavid Howells #define ATMTCP_CTRL_CLOSE	2	/* request/reply */
34607ca46eSDavid Howells 
35607ca46eSDavid Howells struct atmtcp_control {
36607ca46eSDavid Howells 	struct atmtcp_hdr hdr;	/* must be first */
37607ca46eSDavid Howells 	int type;		/* message type; both directions */
38607ca46eSDavid Howells 	atm_kptr_t vcc;		/* both directions */
39607ca46eSDavid Howells 	struct sockaddr_atmpvc addr; /* suggested value from kernel */
40607ca46eSDavid Howells 	struct atm_qos	qos;	/* both directions */
41607ca46eSDavid Howells 	int result;		/* to kernel only */
42607ca46eSDavid Howells } __ATM_API_ALIGN;
43607ca46eSDavid Howells 
44607ca46eSDavid Howells /*
45607ca46eSDavid Howells  * Field usage:
46607ca46eSDavid Howells  * Messge type	dir.	hdr.v?i	type	addr	qos	vcc	result
47607ca46eSDavid Howells  * -----------  ----	------- ----	----	---	---	------
48607ca46eSDavid Howells  * OPEN		K->D	Y	Y	Y	Y	Y	0
49607ca46eSDavid Howells  * OPEN		D->K	-	Y	Y	Y	Y	Y
50607ca46eSDavid Howells  * CLOSE	K->D	-	-	Y	-	Y	0
51607ca46eSDavid Howells  * CLOSE	D->K	-	-	-	-	Y	Y
52607ca46eSDavid Howells  */
53607ca46eSDavid Howells 
54607ca46eSDavid Howells #define SIOCSIFATMTCP	_IO('a',ATMIOC_ITF)	/* set ATMTCP mode */
55607ca46eSDavid Howells #define ATMTCP_CREATE	_IO('a',ATMIOC_ITF+14)	/* create persistent ATMTCP
56607ca46eSDavid Howells 						   interface */
57607ca46eSDavid Howells #define ATMTCP_REMOVE	_IO('a',ATMIOC_ITF+15)	/* destroy persistent ATMTCP
58607ca46eSDavid Howells 						   interface */
59607ca46eSDavid Howells 
60607ca46eSDavid Howells 
61607ca46eSDavid Howells 
62607ca46eSDavid Howells #endif /* _UAPILINUX_ATM_TCP_H */
63