version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.2, 2016/11/01 09:56:12
|
Line 302 EcpNgDataEvent(int type, void *cookie)
|
Line 302 EcpNgDataEvent(int type, void *cookie)
|
socklen_t nsize; |
socklen_t nsize; |
Mbuf bp; |
Mbuf bp; |
int num = 0; |
int num = 0; |
char *bundname, *rest; | char *bundname, *rest, *b1; |
int id; |
int id; |
|
|
while (1) { |
while (1) { |
Line 326 EcpNgDataEvent(int type, void *cookie)
|
Line 326 EcpNgDataEvent(int type, void *cookie)
|
|
|
/* Debugging */ |
/* Debugging */ |
LogDumpBp(LG_FRAME, bp, |
LogDumpBp(LG_FRAME, bp, |
"EcpNgDataEvent: rec'd %d bytes frame on %s hook", MBLEN(bp), naddr.sg_data); | "EcpNgDataEvent: rec'd %zu bytes frame on %s hook", MBLEN(bp), naddr.sg_data); |
|
|
bundname = ((struct sockaddr_ng *)&naddr)->sg_data; |
bundname = ((struct sockaddr_ng *)&naddr)->sg_data; |
if (bundname[0] != 'e' && bundname[0] != 'd') { |
if (bundname[0] != 'e' && bundname[0] != 'd') { |
Line 335 EcpNgDataEvent(int type, void *cookie)
|
Line 335 EcpNgDataEvent(int type, void *cookie)
|
mbfree(bp); |
mbfree(bp); |
continue; |
continue; |
} |
} |
|
/* Keep old value */ |
|
b1 = bundname; |
bundname++; |
bundname++; |
id = strtol(bundname, &rest, 10); |
id = strtol(bundname, &rest, 10); |
if (rest[0] != 0 || !gBundles[id] || gBundles[id]->dead) { |
if (rest[0] != 0 || !gBundles[id] || gBundles[id]->dead) { |
Line 347 EcpNgDataEvent(int type, void *cookie)
|
Line 349 EcpNgDataEvent(int type, void *cookie)
|
b = gBundles[id]; |
b = gBundles[id]; |
|
|
/* Packet requiring compression */ |
/* Packet requiring compression */ |
if (bundname[0] == 'e') { | if (b1[0] == 'e') { |
bp = EcpDataOutput(b, bp); |
bp = EcpDataOutput(b, bp); |
} else { |
} else { |
/* Packet requiring decompression */ |
/* Packet requiring decompression */ |