1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* atm_tcp.h - Driver-specific declarations of the ATMTCP driver (for use by 3*4882a593Smuzhiyun driver-specific utilities) */ 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun /* Written 1997-2000 by Werner Almesberger, EPFL LRC/ICA */ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun #ifndef _UAPILINUX_ATM_TCP_H 9*4882a593Smuzhiyun #define _UAPILINUX_ATM_TCP_H 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #include <linux/atmapi.h> 12*4882a593Smuzhiyun #include <linux/atm.h> 13*4882a593Smuzhiyun #include <linux/atmioc.h> 14*4882a593Smuzhiyun #include <linux/types.h> 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun /* 18*4882a593Smuzhiyun * All values in struct atmtcp_hdr are in network byte order 19*4882a593Smuzhiyun */ 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun struct atmtcp_hdr { 22*4882a593Smuzhiyun __u16 vpi; 23*4882a593Smuzhiyun __u16 vci; 24*4882a593Smuzhiyun __u32 length; /* ... of data part */ 25*4882a593Smuzhiyun }; 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun /* 28*4882a593Smuzhiyun * All values in struct atmtcp_command are in host byte order 29*4882a593Smuzhiyun */ 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun #define ATMTCP_HDR_MAGIC (~0) /* this length indicates a command */ 32*4882a593Smuzhiyun #define ATMTCP_CTRL_OPEN 1 /* request/reply */ 33*4882a593Smuzhiyun #define ATMTCP_CTRL_CLOSE 2 /* request/reply */ 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun struct atmtcp_control { 36*4882a593Smuzhiyun struct atmtcp_hdr hdr; /* must be first */ 37*4882a593Smuzhiyun int type; /* message type; both directions */ 38*4882a593Smuzhiyun atm_kptr_t vcc; /* both directions */ 39*4882a593Smuzhiyun struct sockaddr_atmpvc addr; /* suggested value from kernel */ 40*4882a593Smuzhiyun struct atm_qos qos; /* both directions */ 41*4882a593Smuzhiyun int result; /* to kernel only */ 42*4882a593Smuzhiyun } __ATM_API_ALIGN; 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun /* 45*4882a593Smuzhiyun * Field usage: 46*4882a593Smuzhiyun * Messge type dir. hdr.v?i type addr qos vcc result 47*4882a593Smuzhiyun * ----------- ---- ------- ---- ---- --- --- ------ 48*4882a593Smuzhiyun * OPEN K->D Y Y Y Y Y 0 49*4882a593Smuzhiyun * OPEN D->K - Y Y Y Y Y 50*4882a593Smuzhiyun * CLOSE K->D - - Y - Y 0 51*4882a593Smuzhiyun * CLOSE D->K - - - - Y Y 52*4882a593Smuzhiyun */ 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun #define SIOCSIFATMTCP _IO('a',ATMIOC_ITF) /* set ATMTCP mode */ 55*4882a593Smuzhiyun #define ATMTCP_CREATE _IO('a',ATMIOC_ITF+14) /* create persistent ATMTCP 56*4882a593Smuzhiyun interface */ 57*4882a593Smuzhiyun #define ATMTCP_REMOVE _IO('a',ATMIOC_ITF+15) /* destroy persistent ATMTCP 58*4882a593Smuzhiyun interface */ 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun #endif /* _UAPILINUX_ATM_TCP_H */ 63