Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | struct tp_event { | |
23 | int ev_number; | |
24 | struct timeval e_time; | |
25 | #define TM_inact 0x0 | |
26 | #define TM_retrans 0x1 | |
27 | #define TM_sendack 0x2 | |
28 | #define TM_notused 0x3 | |
29 | ||
30 | union{ | |
31 | struct { SeqNum e_low; SeqNum e_high; int e_retrans; } EV_TM_reference; | |
32 | ||
33 | #define TM_reference 0x4 | |
34 | struct { SeqNum e_low; SeqNum e_high; int e_retrans; } EV_TM_data_retrans; | |
35 | ||
36 | #define TM_data_retrans 0x5 | |
37 | struct { | |
38 | u_char e_reason; | |
39 | } EV_ER_TPDU; | |
40 | ||
41 | #define ER_TPDU 0x6 | |
42 | struct { struct mbuf *e_data; /* first field */ | |
43 | int e_datalen; /* 2nd field */ | |
44 | u_int e_cdt; | |
45 | } EV_CR_TPDU; | |
46 | ||
47 | #define CR_TPDU 0x7 | |
48 | struct { struct mbuf *e_data; /* first field */ | |
49 | int e_datalen; /* 2nd field */ | |
50 | u_short e_sref; | |
51 | u_char e_reason; | |
52 | } EV_DR_TPDU; | |
53 | ||
54 | #define DR_TPDU 0x8 | |
55 | #define DC_TPDU 0x9 | |
56 | struct { struct mbuf *e_data; /* first field */ | |
57 | int e_datalen; /* 2nd field */ | |
58 | u_short e_sref; | |
59 | u_int e_cdt; | |
60 | } EV_CC_TPDU; | |
61 | ||
62 | #define CC_TPDU 0xa | |
63 | struct { u_int e_cdt; | |
64 | SeqNum e_seq; | |
65 | SeqNum e_subseq; | |
66 | u_char e_fcc_present; | |
67 | } EV_AK_TPDU; | |
68 | ||
69 | #define AK_TPDU 0xb | |
70 | struct { struct mbuf *e_data; /* first field */ | |
71 | int e_datalen; /* 2nd field */ | |
72 | u_int e_eot; | |
73 | SeqNum e_seq; | |
74 | } EV_DT_TPDU; | |
75 | ||
76 | #define DT_TPDU 0xc | |
77 | struct { struct mbuf *e_data; /* first field */ | |
78 | int e_datalen; /* 2nd field */ | |
79 | SeqNum e_seq; | |
80 | } EV_XPD_TPDU; | |
81 | ||
82 | #define XPD_TPDU 0xd | |
83 | struct { SeqNum e_seq; } EV_XAK_TPDU; | |
84 | ||
85 | #define XAK_TPDU 0xe | |
86 | #define T_CONN_req 0xf | |
87 | struct { u_char e_reason; } EV_T_DISC_req; | |
88 | ||
89 | #define T_DISC_req 0x10 | |
90 | #define T_LISTEN_req 0x11 | |
91 | #define T_DATA_req 0x12 | |
92 | #define T_XPD_req 0x13 | |
93 | #define T_USR_rcvd 0x14 | |
94 | #define T_USR_Xrcvd 0x15 | |
95 | #define T_DETACH 0x16 | |
96 | #define T_NETRESET 0x17 | |
97 | #define T_ACPT_req 0x18 | |
98 | }ev_union; | |
99 | };/* end struct event */ | |
100 | ||
101 | #define tp_NEVENTS 0x19 | |
102 | ||
103 | #define ATTR(X)ev_union.EV_/**/X/**/ |