Commit | Line | Data |
---|---|---|
9093c13c KS |
1 | #ifdef KERNEL |
2 | #define PRC_IFUP 3 | |
3 | #define PRC_LINKUP 4 | |
4 | #define PRC_LINKDOWN 5 | |
5 | #define PRC_LINKRESET 6 | |
6 | #define PRC_LINKDONTCOPY 7 | |
7 | #endif | |
8 | ||
9 | #define CCITTPROTO_HDLC 1 | |
10 | #define CCITTPROTO_X25 2 /* packet level protocol */ | |
11 | #define IEEEPROTO_802LLC 3 /* doesn't belong here */ | |
12 | ||
13 | #define HDLCPROTO_LAP 1 | |
14 | #define HDLCPROTO_LAPB 2 | |
15 | #define HDLCPROTO_UNSET 3 | |
16 | #define HDLCPROTO_LAPD 4 | |
17 | ||
18 | /* | |
19 | * X.25 Socket address structure. It contains the X.121 or variation of | |
20 | * X.121, facilities information, higher level protocol value (first four | |
21 | * bytes of the User Data field), and the last 12 characters of the User | |
22 | * Data field. | |
23 | */ | |
24 | ||
25 | struct x25_sockaddr { /* obsolete - use sockaddr_x25 */ | |
26 | short xaddr_len; /* Length of xaddr_addr. */ | |
27 | u_char xaddr_addr[15]; /* Network dependent or X.121 address. */ | |
28 | u_char xaddr_facilities; /* Facilities information. */ | |
29 | #define XS_REVERSE_CHARGE 0x01 | |
30 | #define XS_HIPRIO 0x02 | |
31 | u_char xaddr_proto[4]; /* Protocol ID (4 bytes of user data). */ | |
32 | u_char xaddr_userdata[12]; /* Remaining User data field. */ | |
33 | }; | |
34 | ||
35 | /* | |
36 | * network configuration info | |
37 | * this structure must be 16 bytes long | |
38 | */ | |
39 | ||
40 | struct x25config { | |
41 | u_short xc_family; /* always AF_CCITT */ | |
42 | u_short xc_net; /* network id (usually a dnic) */ | |
43 | char xc_ntnlen; | |
44 | char xc_ntn[5]; /* network specific address (in bcd) */ | |
45 | /* link level parameters */ | |
46 | u_short xc_lproto:4, /* link level protocol eg. CCITTPROTO_HDLC */ | |
47 | xc_lptype:4, /* protocol type eg. HDLCPROTO_LAPB */ | |
48 | xc_lwsize:5, /* link level window size */ | |
49 | xc_ltrace:1, /* link level tracing flag */ | |
50 | xc_rsvd1:2; /* for use by other link-level protocols */ | |
51 | /* packet level parameters */ | |
52 | u_short xc_pwsize:3, /* default window size */ | |
53 | xc_psize:4, /* default packet size 7=128, 8=256, ... */ | |
54 | xc_type:2, /* network type */ | |
55 | #define X25_1976 0 | |
56 | #define X25_1980 1 | |
57 | #define X25_1984 2 | |
58 | xc_ptrace:1, /* packet level tracing flag */ | |
59 | xc_rsvd2:6; | |
60 | u_char xc_maxlcn; /* max logical channels */ | |
61 | u_char xc_rsvd3; | |
62 | }; | |
63 | ||
64 | /* | |
65 | * X.25 Socket address structure. It contains the network id, X.121 | |
66 | * address, facilities information, higher level protocol value (first four | |
67 | * bytes of the User Data field), and up to 12 characters of User Data. | |
68 | */ | |
69 | ||
70 | struct sockaddr_x25 { | |
71 | short x25_family; /* must be AF_CCITT */ | |
72 | short x25_net; /* network id code (usually a dnic) */ | |
73 | struct x25opts { | |
74 | char op_flags; /* miscellaneous options */ | |
75 | #define X25_REVERSE_CHARGE 0x01 /* remote DTE pays for call */ | |
76 | #define X25_DBIT 0x02 /* not yet supported */ | |
77 | #define X25_MQBIT 0x04 /* prepend M&Q bit status byte to packet data */ | |
78 | #define X25_OLDSOCKADDR 0x08 /* uses old sockaddr structure */ | |
79 | char op_psize; /* requested packet size */ | |
80 | #define X25_PS128 7 | |
81 | #define X25_PS256 8 | |
82 | #define X25_PS512 9 | |
83 | char op_wsize; /* window size (1 .. 7) */ | |
84 | char op_speed; /* throughput class */ | |
85 | } x25_opts; | |
86 | char x25_addr[16]; /* X.121 address (null terminated) */ | |
87 | short x25_udlen; /* user data field length */ | |
88 | char x25_udata[16]; /* user data field */ | |
89 | }; |