/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2002-2012 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
/*
* bgp cisco ipv6 method
*
* Glenn Fowler
* AT&T Research
*/
#include "bgplib.h"
typedef struct Ciscov6state_s
{
char* line;
/*
* ciscov6 identf
*/
static int
{
register char* s;
register char* e;
register char* f;
register int c;
char* v;
int m;
m = 0;
v = 0;
s = (char*)buf;
e = s + n;
for (;;)
{
for (;;)
{
if (s >= e)
return 0;
c = *s++;
if (!isspace(c))
break;
}
f = s - 1;
for (;;)
{
if (s >= e)
return 0;
if (*s++ == '\n')
break;
}
if (!isascii(*f) && (s - f) > 256)
return 0;
v++;
{
break;
}
}
return 1;
}
/*
* ciscov6 openf
*/
static int
{
{
return -1;
}
{
U - Per-user Static route\n\
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea\n\
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2\n");
}
return 0;
}
/*
* ciscov6 readf
*/
static int
{
register char* s;
int o;
int p;
char* t;
{
t = s;
while (*s && *s != '\n' && *s != ' ' && *s != '\t')
s++;
switch (*t)
{
case 'B':
o = 0;
p = 0;
for (;;)
{
while (*s == ' ' || *s == '\t')
s++;
if (*s && *s != '\n')
{
t = s;
while (*s && *s != '\n' && *s != ' ' && *s != '\t')
s++;
while (*s == ' ' || *s == '\t')
s++;
switch (p)
{
case 0:
p = 1;
break;
case 1:
if ((s - t) > 3 && t[0] == 'v' && t[1] == 'i' && t[2] == 'a')
p = 2;
break;
case 2:
p = 3;
break;
}
}
if ((!*s || *s == '\n') && (!(s = state->line = sfgetr(file->io, '\n', 0)) || *s != ' ' && *s != '\t' && *s != '\r' && *s != '\n'))
break;
}
if (p != 3)
return 0;
break;
default:
continue;
}
return 1;
}
return 0;
}
/*
* ciscov6 writef
*/
static int
{
#if 0
register int i;
register int j;
register int k;
else
else
else
else
{
else
}
else
else
{
for (i = 0; i < j; i++)
{
if (k = ap[++i])
{
k += i - 1;
while (i < k)
}
else
}
else
}
{
}
{
}
{
}
{
return -1;
}
#endif
return 0;
}
/*
* ciscov6 closef
*/
static int
{
return -1;
return 0;
}
{
"ciscov6",
"cisco ipv6 router dump format (2009-03-15)",
CXH,
0,
0,
0,
};