1) Please find attached patch. These "vendor" and "vendor2" strings were
too short and logs were truncated, I corrected this.
2) Something different (but related). In order to get understandable
logs, I have extracted the rfc1048_print() function from
<http://www.tcpdump.org/>, and "plugged" in pump(), which allows me to
get such alphanumerical logs�:
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 0x63 0x53 0x82 0x63
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 53 1 0x05
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 58 4 0x00 0x00 0x54 0x6
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 59 4 0x00 0x00 0x93 0xa
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 51 4 0x00 0x00 0xa8 0xc
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 54 4 0x8c 0x4d 0x01 0xb
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 1 4 0xff 0xff 0xff 0x0
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 3 4 0x8c 0x4d 0x0f 0x0
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 6 8 0x8c 0x4d 0x01 0x2
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: ++++++ 0x8c 0x4d 0x01 0xb7
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 15 18 0x72 0x65 0x73 0x6
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: ++++++ 0x6d 0x2e 0x65 0x6e
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: ++++++ 0x73 0x2d 0x6c 0x79
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: ++++++ 0x6f 0x6e 0x2e 0x66
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: ++++++ 0x72 0x00
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 28 4 0x8c 0x4d 0x0f 0xf
Sep 10 14:25:18 nautilus pumpd[870]: bresp: vendor: 0xff
Sep 10 14:25:18 nautilus pumpd[870]: parsed: vend-rfc1048 DHCP:ACK
Sep 10 14:25:18 nautilus pumpd[870]: parsed: RN:21600 RB:37800 LT:43200
Sep 10 14:25:18 nautilus pumpd[870]: parsed: SID:140.77.1.183 SM:255.255.255.0
Sep 10 14:25:18 nautilus pumpd[870]: parsed: DG:140.77.15.1 NS:140.77.1.32,
Sep 10 14:25:18 nautilus pumpd[870]: parsed: 140.77.1.183 DN:"resam.ens-lyon
Sep 10 14:25:18 nautilus pumpd[870]: parsed: .fr^@" BR:140.77.15.255
Sep 10 14:25:18 nautilus pumpd[870]: PUMP: got lease
I am currently trying to write a little parser for old logs, which I
will then use to build a independant filter able to translate numerical
old logs into opcodes. This is interesting to understand DHCP problems
with already installed and running machines.
I have two sorts of questions related to this work�:
- are such "heavy" (well, compared to the attached patch...) adds to
pump code welcome ? If yes, I will include my modifications directly
into the file dhcp.c and others. If not, I'll try to stay rather
independant, and to write the whole thing as a big patch.
- last but not least, I would be pleased to get advice concerning
licensing issues. There are three parts in this work: pump(GPL),
tcpdump(BSD) extract, and my modifications(whatever). So, how to
handle this�?
Any other advice related to this are welcome. Don't hesitate to answer
only to me, and not to lists :-) I did not subscribe to tcpdump-workers.
Thanks in advance.
Cheers,
Marc.
--
If this picture is correct, then black holes could in principle be
'programmed': one forms a black hole whose initial conditions encode
the information to be processed, lets that information be processed by
the planckian dynamics at the hole's horizon, and extracts the answer
to the computation by examining the correlations in the Hawking
radiation emitted when the hole evaporates.
-- Lloyd, Seth. Ultimate Physical Limits to Computation. Nature 406
-- <http://xxx.lanl.gov/abs/quant-ph/9908043>
--- dhcp.c 2001/09/10 12:12:51 1.2
+++ dhcp.c 2001/09/16 18:52:39
@@ -634,7 +634,8 @@
}
void debugbootpRequest(char *name, struct bootpRequest *breq) {
- char vendor[28], vendor2[28];
+#define BOOTP_VENDOR_SSIZE 32
+ char vendor[BOOTP_VENDOR_SSIZE], vendor2[BOOTP_VENDOR_SSIZE];
int i;
struct in_addr address;
unsigned char *vndptr;
@@ -696,7 +697,7 @@
syslog (LOG_DEBUG, "%s: vendor: %s", name, vendor);
strcpy (vendor, "++++++");
}
- snprintf (vendor2, 27, "%s 0x%02x", vendor, *vndptr++);
+ snprintf (vendor2, BOOTP_VENDOR_SSIZE-1, "%s 0x%02x", vendor,
+*vndptr++);
strcpy (vendor, vendor2);
}
@@ -708,7 +709,7 @@
rfc1048_print (breq->vendor, DHCP_VENDOR_LENGTH);
return;
-
+#undef BOOTP_VENDOR_SSIZE
}
static char * handleTransaction(int s, struct pumpOverrideInfo * override,