1 /* 2 * Argus Software 3 * Copyright (c) 2000-2015 QoSient, LLC 4 * All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2, or (at your option) 9 * any later version. 10 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * 20 */ 21 22 /* 23 * Copyright (c) 1993, 1994 Carnegie Mellon University. 24 * All rights reserved. 25 * 26 * Permission to use, copy, modify, and distribute this software and 27 * its documentation for any purpose and without fee is hereby granted, 28 * provided that the above copyright notice appear in all copies and 29 * that both that copyright notice and this permission notice appear 30 * in supporting documentation, and that the name of CMU not be 31 * used in advertising or publicity pertaining to distribution of the 32 * software without specific, written prior permission. 33 * 34 * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 35 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 36 * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 37 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 38 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 39 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 40 * SOFTWARE. 41 * 42 */ 43 44 /* 45 * $Id: //depot/argus/argus/include/argus/cons_def.h#6 $ 46 * $DateTime: 2015/04/06 10:38:44 $ 47 * $Change: 2973 $ 48 */ 49 50 51 52 /* 53 0 1 2 3 54 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 55 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 56 |0| Protocol | L | IP Opt | Exp | State | 57 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 58 59 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 60 |1| Operation | Data | 61 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 62 63 Argus Status Field Format 64 Note that one tick mark represents one bit position. 65 66 */ 67 /* Argus Operation */ 68 69 #define ARGUSCONTROL 0x80000000 70 71 #define INIT 0x01000000 72 #define STATUS 0x02000000 73 #define CLOSE 0x04000000 74 75 76 /* Protocol Specification */ 77 78 #define PROTOCONTROL 0x00000000 79 80 #define IPPROTO 0x01000000 81 #define UDPPROTO 0x02000000 82 #define ICMPPROTO 0x04000000 83 #define TCPPROTO 0x08000000 84 #define EPPROTO 0x10000000 85 #define ARPPROTO 0x20000000 86 87 #define PROTOMASK 0x7F000000 88 89 /* Link Dependant Bits (L) */ 90 91 #define FRAGMENTS 0x400000 92 #define MULTIADDR 0x800000 93 94 95 /* IP Option Status Bits */ 96 97 #define TIMESTAMP 0x010000 98 #define SECURITY 0x020000 99 #define LSRCROUTE 0x040000 100 #define RECORDROUTE 0x080000 101 #define SSRCROUTE 0x100000 102 #define RTRALERT 0x200000 103 104 #define IPOPTIONMASK 0x3F0000 105 106 107 /* Report Status Bits (Exp) */ 108 109 #define REVERSE 0x1000 110 #define MODIFIED 0x2000 111 #define LOGGED 0x4000 112 #define DETAIL 0x8000 113 114 115 /* IP, TCP and UDP State Constants and Reporting Values */ 116 117 #define IP_INIT 0x0001 118 #define UDP_INIT 0x0001 119 #define SAW_SYN 0x0001 120 #define SAW_SYN_SENT 0x0002 121 #define CON_ESTABLISHED 0x0004 122 #define CLOSE_WAITING 0x0008 123 #define PKTS_RETRANS 0x0410 /* SRC_PKTS_RETRANS | DST_PK*/ 124 #define SRC_PKTS_RETRANS 0x0010 125 #define WINDOW_SHUT 0x0060 /* SRC_WINDOW_SHUT | DST_WIN*/ 126 #define SRC_WINDOW_SHUT 0x0020 127 #define DST_WINDOW_SHUT 0x0040 128 #define NORMAL_CLOSE 0x0080 129 #define RESET 0x0900 /* SRC_RESET | DST_RESET */ 130 #define SRC_RESET 0x0100 131 #define TIMED_OUT 0x0200 132 #define DST_PKTS_RETRANS 0x0400 133 #define DST_RESET 0x0800 134 135 /* Fragment State Constants and Reporting Values */ 136 137 #define FRAG_INIT 0x0001 138 #define FRAG_OUT_OF_ORDER 0x0002 139 #define TCP_FRAG_OFFSET_PROBLEM 0x0008 140 #define FRAG_ONLY 0x0010 141 142 143