Commit | Line | Data |
---|---|---|
17efd7fe MK |
1 | /**************************************************************************/ |
2 | /* */ | |
3 | /* there seems to exist no standard for the contents of HMP traps */ | |
4 | /* RFC 869 simply says that it should "usually contain an identifier,.. */ | |
5 | /* the local time..., and data pertinent to the event." */ | |
6 | /* */ | |
7 | /* Being unwilling to create a defacto (non)standard, since I am not a */ | |
8 | /* montoring wizard, I mostly punted. There is a trap routine which will */ | |
9 | /* send message with the structure below at the start of the data section,*/ | |
10 | /* followed by whatever data you passed to it up to the size of one mbuf */ | |
11 | /* */ | |
12 | /* I've also included some trap codes -- which I believe are descended */ | |
13 | /* from 4.1?? You will find them used in the code but commented out.. */ | |
14 | /* */ | |
15 | /**************************************************************************/ | |
16 | ||
17 | #if HMP && HMPTRAPS | |
18 | struct hmp_trap | |
19 | { | |
20 | u_long ht_type; | |
21 | u_long ht_time; | |
22 | }; | |
23 | ||
24 | /* | |
25 | * need more host information traps -- like if the machine is going down | |
26 | */ | |
27 | #define T_MEM_DROP 0x0 /* packet drop due to memory */ | |
28 | ||
29 | #define T_IP_CKSUM 0x10 /* IP checksum */ | |
30 | #define T_IP_ADDRS 0x11 /* address error */ | |
31 | #define T_IP_FDROP 0x12 /* fragment dropped (timeout) */ | |
32 | #define T_IP_TRUNC 0x13 /* truncated packet */ | |
33 | #define T_IP_OVFLO 0x14 /* header overflow */ | |
34 | #define T_IP_HLEN 0x15 /* header length */ | |
35 | #define T_MEM_FGLEAN 0x16 /* IP frag reclaimed for memory */ | |
36 | ||
37 | #define T_TCP_CKSUM 0x20 /* TCP checksum */ | |
38 | #define T_TCP_OVFLO 0x21 /* header overflow */ | |
39 | #define T_TCP_HLEN 0x22 /* header length */ | |
40 | #define T_TCP_REXMTTL 0x23 /* retransmit too long */ | |
41 | #define T_TCP_DUP 0x24 /* duplicate drop */ | |
42 | #define T_TCP_ORDER 0x25 /* out of order receipt */ | |
43 | #define T_TCP_WINDOW 0x26 /* out of window receipt */ | |
44 | #define T_TCP_RDROP 0x27 /* "" end of new segment */ | |
45 | #define T_TCP_UDROP 0x28 /* data dropped from end of q */ | |
46 | #define T_MEM_TGLEAN 0x29 /* TCP unacked segment "" */ | |
47 | ||
48 | #define T_UDP_CKSUM 0x30 /* UDP checksum */ | |
49 | ||
50 | #define T_ICMP_CKSUM 0x40 /* ICMP checksum */ | |
51 | #define T_ICMP_SRCQ 0x41 /* source quench rcvd */ | |
52 | #define T_ICMP_REDIR 0x42 /* redirect rcvd */ | |
53 | #define T_ICMP_TIMEX 0x43 /* time exceeded */ | |
54 | #define T_ICMP_PARM 0x44 /* parameter problem */ | |
55 | ||
56 | #define T_HMP_CKSUM 0x50 /* HMP checksum */ | |
57 | #define T_HMP_STYPE 0x51 /* wrong system type */ | |
58 | #define T_HMP_MTYPE 0x52 /* bad message type */ | |
59 | #define T_HMP_PASSWD 0x53 /* bad password */ | |
60 | ||
61 | #endif |