This patch fixes the PCAP logging. If frames are received from E1 interface, an 8 byte mISDN header (MISDN_HEADER_LEN) is in front of the RSL packet. When frames are transmitted to the E1 interface, the pcap_write_packet function will get a message buffer without the mISDN header in front of the RSL packet. The pcap file was tested and the output is correct.
On Tuesday 09 June 2009 09:46:23 Andreas.Eversberg wrote:
This patch fixes the PCAP logging. If frames are received from E1 interface, an 8 byte mISDN header (MISDN_HEADER_LEN) is in front of the RSL packet. When frames are transmitted to the E1 interface, the pcap_write_packet function will get a message buffer without the mISDN header in front of the RSL packet. The pcap file was tested and the output is correct.
Cool, you are right about the misdn.c case. in the ip-access case it is different. It looks like we should use msg->l2h instead of msg->data in the write_pcap_output. Could you attempt doing that with msg->l2h, e.g. add the mISDNheader in the msgb struct and set it in misdn.c and use it in the write_pcap_output?
z.
On Tuesday 09 June 2009 09:46:23 Andreas.Eversberg wrote:
This patch fixes the PCAP logging. If frames are received from E1 interface, an 8 byte mISDN header (MISDN_HEADER_LEN) is in front of the RSL packet. When frames are transmitted to the E1 interface, the pcap_write_packet function will get a message buffer without the mISDN header in front of the RSL packet. The pcap file was tested and the output is correct.
I just pushed this change. The ipaccess.c didn't use the method used to dispatch the data to NM or RSL so was already broken in regard to write down incoming packets and you patch didn't break it anymore.
My original comment still holds true that this code should use msgb_l2 and msgb_l2len instead of msgb->data and we should fix that in a follow on commit.
z.