1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
|
/*
* Argus Client Software. Tools to read, analyze and manage Argus data.
* Copyright (c) 2000-2003 QoSient, LLC
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/*
* Copyright (c) 1993, 1994 Carnegie Mellon University.
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of CMU not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*
*/
#ifndef Argus_out_h
#define Argus_out_h
#if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || (__OpenBSD__)
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#endif
#include <netinet/if_ether.h>
#include <netinet/rtp.h>
#include <llc.h>
struct ArgusETHERObject {
unsigned char ethersrc[6];
unsigned char etherdst[6];
};
struct ArgusMACFlow {
struct ether_header ehdr;
unsigned char dsap, ssap;
};
struct ArgusESPFlow {
unsigned int ip_src, ip_dst;
unsigned char ip_p, tp_p;
unsigned short pad;
unsigned int spi;
};
struct ArgusArpFlow {
unsigned int arp_spa;
unsigned int arp_tpa;
unsigned char etheraddr[6];
unsigned short pad;
};
struct ArgusRarpFlow {
unsigned int arp_tpa;
unsigned char srceaddr[6];
unsigned char tareaddr[6];
};
struct ArgusICMPFlow {
unsigned int ip_src, ip_dst;
unsigned char ip_p, tp_p;
unsigned char type, code;
unsigned short id, ip_id;
};
struct ArgusIPFlow {
unsigned int ip_src, ip_dst;
unsigned char ip_p, tp_p;
unsigned short sport, dport;
unsigned short ip_id;
};
#define ip_flow flow_union.ip
#define icmp_flow flow_union.icmp
#define mac_flow flow_union.mac
#define arp_flow flow_union.arp
#define rarp_flow flow_union.rarp
#define esp_flow flow_union.esp
struct ArgusLoadObject {
int n;
float minval;
float meanval;
float stdev;
float maxval;
};
struct ArgusLoadStruct {
struct ArgusLoadObject pktsPerSec, bytesPerSec;
};
struct ArgusTimeObject {
int n;
unsigned int minval;
unsigned int meanval;
unsigned int stdev;
unsigned int maxval;
};
struct ArgusTimeEntity {
struct ArgusTimeObject act, idle;
};
struct ArgusAHObject {
unsigned int src_spi, dst_spi;
unsigned int src_replay, dst_replay;
};
struct ArgusARPObject {
unsigned char respaddr[6];
unsigned short pad;
};
struct ArgusDHCPObject {
unsigned int respaddr;
};
struct ArgusFragObject {
unsigned char type, length;
unsigned short status;
int fragnum, frag_id;
unsigned short ip_id, totlen, currlen, maxfraglen;
};
struct ArgusICMPObject {
unsigned char type, length;
unsigned short status;
unsigned char icmp_type, icmp_code;
unsigned short iseq;
unsigned int osrcaddr, odstaddr;
unsigned int isrcaddr, idstaddr;
unsigned int igwaddr;
};
struct ArgusTCPObjectMetrics {
unsigned int seqbase, ackbytes;
unsigned int bytes, rpkts;
unsigned short win;
unsigned char flags, pad;
};
struct ArgusTCPObject {
unsigned char type, length;
unsigned short status;
unsigned int state;
unsigned int options;
unsigned int synAckuSecs, ackDatauSecs;
struct ArgusTCPObjectMetrics src, dst;
};
struct ArgusRTPObject {
unsigned char type, length;
unsigned short status;
struct rtphdr src, dst;
unsigned short sdrop, ddrop;
unsigned short ssdev, dsdev;
};
struct ArgusRTCPObject {
unsigned char type, length;
unsigned short status;
struct rtcphdr src, dst;
unsigned short src_pkt_drop, dst_pkt_drop;
};
struct ArgusFRAGObject {
int fragnum, frag_id;
unsigned short status, totlen, currlen, maxfraglen;
};
struct ArgusESPObject {
unsigned int spi, lastseq, lostseq;
};
struct ArgusESPStruct {
unsigned char type, length;
u_short status;
struct ArgusESPObject src, dst;
};
struct ArgusAGRStruct {
unsigned char type, length;
u_short status;
unsigned int count;
struct timeval laststartime, lasttime;
struct ArgusTimeObject act, idle;
};
struct ArgusPerfStruct {
unsigned char type, length;
u_short status;
int count;
struct ArgusLoadStruct src, dst;
};
struct ArgusTimeStruct {
unsigned char type, length;
u_short status;
struct ArgusTimeEntity src, dst;
};
struct ArgusMacStruct {
unsigned char type, length;
unsigned short status;
union {
struct ArgusETHERObject ether;
} phys_union;
};
#define ether_mac phys_union.ether
struct ArgusVlanStruct {
unsigned char type, length;
unsigned short status;
unsigned short sid, did;
};
struct ArgusMplsStruct {
unsigned char type, length;
unsigned short status;
unsigned int slabel;
unsigned int dlabel;
};
struct ArgusMarStruct {
struct argtimeval startime, now;
unsigned char major_version, minor_version;
unsigned char interfaceType, interfaceStatus;
unsigned short reportInterval, argusMrInterval;
unsigned int argusid, localnet, netmask, nextMrSequenceNum;
unsigned long long pktsRcvd, bytesRcvd;
unsigned int pktsDrop, flows, flowsClosed;
unsigned int actIPcons, cloIPcons;
unsigned int actICMPcons, cloICMPcons;
unsigned int actIGMPcons, cloIGMPcons;
unsigned int actFRAGcons, cloFRAGcons;
unsigned int actSECcons, cloSECcons;
int record_len;
};
struct ArgusTimeDesc {
struct timeval start;
struct timeval last;
};
struct ArgusFlow {
union {
struct ArgusIPFlow ip;
struct ArgusICMPFlow icmp;
struct ArgusMACFlow mac;
struct ArgusArpFlow arp;
struct ArgusRarpFlow rarp;
struct ArgusESPFlow esp;
} flow_union;
};
struct ArgusIPAttributes {
unsigned short soptions, doptions;
unsigned char sttl, dttl;
unsigned char stos, dtos;
};
struct ArgusARPAttributes {
unsigned char response[8];
};
struct ArgusAttributes {
union {
struct ArgusIPAttributes ip;
struct ArgusARPAttributes arp;
} attr_union;
};
#define attr_ip attr.attr_union.ip
#define attr_arp attr.attr_union.arp
struct ArgusMeter {
unsigned int count, bytes, appbytes;
};
struct ArgusFarHeaderStruct {
unsigned char type, length;
unsigned short status;
};
struct ArgusFarStruct {
unsigned char type, length;
unsigned short status;
unsigned int ArgusTransRefNum;
struct ArgusTimeDesc time;
struct ArgusFlow flow;
struct ArgusAttributes attr;
struct ArgusMeter src, dst;
};
struct ArgusRecordHeader {
unsigned char type, cause;
unsigned short length;
unsigned int status;
unsigned int argusid;
unsigned int seqNumber;
};
struct ArgusRecord {
struct ArgusRecordHeader ahdr;
union {
struct ArgusMarStruct mar;
struct ArgusFarStruct far;
} ar_union;
};
struct ArgusCanonicalRecord {
struct ArgusRecordHeader ahdr;
struct ArgusFarStruct far;
struct ArgusMacStruct mac;
union {
struct ArgusTCPObject tcp;
struct ArgusESPStruct esp;
struct ArgusICMPObject icmp;
struct ArgusDHCPObject dhcp;
struct ArgusRTPObject rtp;
struct ArgusRTCPObject rtcp;
struct ArgusARPObject arp;
struct ArgusAHObject ah;
struct ArgusFRAGObject frag;
} acr_union;
struct ArgusAGRStruct agr;
struct ArgusTimeStruct time;
struct ArgusVlanStruct vlan;
struct ArgusMplsStruct mpls;
};
#define argus_mar ar_union.mar
#define argus_far ar_union.far
#define acr_arp acr_union.arp
#define acr_dhcp acr_union.dhcp
#define acr_icmp acr_union.icmp
#define acr_igmp acr_union.igmp
#define acr_tcp acr_union.tcp
#define acr_rtp acr_union.rtp
#define acr_esp acr_union.esp
#define acr_frag acr_union.frag
struct ArgusUserStruct {
unsigned char type, length;
u_short status;
char data;
};
#endif /* Argus_out_h */
|