/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2002-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* netflow dump type
*
* Glenn Fowler
* AT&T Research
*/
#include "flowlib.h"
#include <swap.h>
typedef struct Hdr_1_s
{
} Hdr_1_t;
typedef struct Rec_1_s
{
} Rec_1_t;
typedef struct Hdr_5_s
{
} Hdr_5_t;
typedef struct Rec_5_s
{
} Rec_5_t;
typedef struct Hdr_7_s
{
} Hdr_7_t;
typedef struct Rec_7_s
{
} Rec_7_t;
#define FLOW_TEMPLATE 0
typedef struct Rec_9_s
{
} Rec_9_t;
typedef struct State_s
{
char* data;
char* next;
int swap;
int count;
int flush;
int version;
} State_t;
/*
* identf
*/
static int
{
if (n < sizeof(Hdr_1_t))
return 0;
{
case 1:
case 5:
case 7:
return n >= 1 && n <= 30;
}
{
case 1:
case 5:
case 7:
return n >= 1 && n <= 30;
}
return 0;
}
/*
* fopenf
*/
static int
{
if (!(state = vmnewof(file->dss->vm, 0, State_t, 1, (file->flags & DSS_FILE_WRITE) ? NETFLOW_PACKET : 0)))
{
return -1;
}
return 0;
}
/*
* freadf
*/
static int
{
int n;
{
{
{
return -1;
}
return 0;
}
for (;;)
{
switch (n)
{
case 1:
n = 16;
{
}
else
break;
case 5:
n = 24;
{
}
else
break;
case 7:
n = 24;
{
}
else
break;
default:
{
(*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "%sheader corrupted", cxlocation(file->dss->cx, record));
return -1;
}
continue;
}
break;
}
}
{
case 1:
{
}
else
break;
case 5:
{
}
else
break;
case 7:
{
}
else
break;
}
return 1;
}
/*
* fwritef
*/
static int
{
register size_t n;
{
{
case 1:
n = 16;
{
}
else
break;
case 5:
n = 24;
{
}
else
{
}
break;
case 7:
n = 24;
{
}
else
break;
}
}
{
(*disc->errorf)(NiL, disc, 2, "%s%d: record version does not match header version %d", cxlocation(file->dss->cx, record), rp->version, state->version);
return -1;
}
{
case 1:
n = sizeof(Rec_1_t);
{
}
else
#if 0
#endif
break;
case 5:
n = sizeof(Rec_5_t);
{
}
else
break;
case 7:
n = sizeof(Rec_7_t);
{
}
else
break;
}
{
{
return -1;
}
}
return 0;
}
/*
* fclosef
*/
static int
{
if (!state)
return -1;
{
{
return -1;
}
}
return 0;
}
{
"dump",
"Cisco netflow dump format (2008-06-24)",
CXH,
0,
0,
0,
};