tcpdump mailing list archives
Re: Request for a DLT code for IPMB packet
From: Guy Harris <guy () alum mit edu>
Date: Thu, 09 Aug 2007 11:44:53 -0700
Toeung, Chanthy wrote:
I'm doing a project on creating a plugins of packet IPMB ( with I2C interface ) in Wireshark. Now i need a specific DLT code for this packet so that i can put my code in Open Source of Wirshark. Can you please assign me one number ?
So presumably the first byte of the packet data will be the slave address, followed by the netFn and LUN, followed by the checksum, etc.?
Moreover, Can you tell me how to add a new Capture type to libpcap ?
Capture type, or DLT_ type?If you mean "capture type", i.e. a new mechanism for capturing traffic (so that you can capture traffic on the I2C bus), you'd have to modify the pcap-*.c file for the OS on which you're doing this (pcap-win32.c for Windows, pcap-linux.c for Linux, pcap-bpf.c for various BSDs including OS X, pcap-dlpi.c for Solaris and some other UN*Xes, etc.).
See, for example, pcap-linux.c's "pcap_open_live()" routine. It checks for some special device names - any name with "dag" in it is assumed to be an Endace DAG device, any name with "septel" in it is assumed to be an Intel SS7 device, etc. - and, for each of the special device name types, calls a special open_live routine.
If you want to add an I2C/IPMB capture device, you'd add a similar chunk of code to the open_live routine for the OS you're using, and have it call an open_live routine for I2C/IPMB. That routine would check the device name (it might, for example, be "i2c" or "ipmb"), allocate a pcap_t data structure, and fill it in appropriately.
Some of the items to fill in are pointers to routines to, for example, read a new packet from the device.
See, for example, the Linux Bluetooth and USB capture devices for examples. Unfortunately, there's no "how to add a new type of capture device" documentation - and the interface for that will probably change at some point.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Request for a DLT code for IPMB packet Toeung, Chanthy (Aug 02)
- Re: Request for a DLT code for IPMB packet Hannes Gredler (Aug 06)
- Re: Request for a DLT code for IPMB packet Guy Harris (Aug 09)
- Re: Request for a DLT code for IPMB packet Guy Harris (Aug 13)
- Re: Request for a DLT code for IPMB packet Toeung, Chanthy (Aug 13)
- Re: Request for a DLT code for IPMB packet Guy Harris (Aug 14)
- Re: Request for a DLT code for IPMB packet Toeung, Chanthy (Aug 15)
- Re: Request for a DLT code for IPMB packet Guy Harris (Aug 15)
- Re: Request for a DLT code for IPMB packet ( WTAP_ENCAP_IPMB ? ) Toeung, Chanthy (Aug 15)
- Re: Request for a DLT code for IPMB packet ( WTAP_ENCAP_IPMB Guy Harris (Aug 15)
- Re: Request for a DLT code for IPMB packet ( WTAP_ENCAP_IPMB Toeung, Chanthy (Aug 15)
- Re: Request for a DLT code for IPMB packet ( WTAP_ENCAP_IPMB Guy Harris (Aug 15)
- Re: Request for a DLT code for IPMB packet Toeung, Chanthy (Aug 13)