1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

ok, more or less works for small as-sets, not yet ready to big ones..

This commit is contained in:
snar
2007-03-23 12:47:28 +00:00
parent bbea84badd
commit 5742c3dfae
3 changed files with 40 additions and 6 deletions

View File

@@ -17,6 +17,8 @@
#include "bgpq3.h"
#include "sx_report.h"
int debug_expander=1;
int
bgpq_expander_init(struct bgpq_expander* b, int af)
{
@@ -30,6 +32,7 @@ bgpq_expander_init(struct bgpq_expander* b, int af)
b->family=af;
b->sources="ripe,radb,apnic";
b->name="UNKNOWN";
b->aswidth=8;
return 1;
@@ -113,7 +116,6 @@ bgpq_expanded_prefix(char* as, void* udata)
{
struct bgpq_expander* ex=(struct bgp_expander*)udata;
if(!ex) return 0;
printf("expanded prefix %s\n", as);
bgpq_expander_add_prefix(ex,as);
return 1;
};
@@ -130,6 +132,8 @@ bgpq_expand_radb(int fd, int (*callback)(char*, void*), void* udata,
vsnprintf(request,sizeof(request),fmt,ap);
va_end(ap);
SX_DEBUG(debug_expander,"expander: sending '%s'\n", request);
write(fd,request,strlen(request));
memset(request,0,sizeof(request));
ret=read(fd,request,sizeof(request)-1);