worked in rc2 but doesn't in rc3

1 reply [Last post]
echtzeitigkeit
Offline
Joined: 12/10/2008

Hi *,

I wrote a custom header (ieee 802.11 radiotap) which worked fine until rc3.

i did change all the annotations. its compiling, even decoding all those optional subheaders (writing correct values in optionsBitmap, optionsLengths and optionsOffsets).

but with rc3 i'm getting a nullpointer-exception

Opening: /home/[... snip ...]/captures/radiotap_IEEE80211_LLC_IP4_TCP
Protocol for this DLT [(127) which is (IEEE802_11_RADIO)] --> [org.jnetpcap.packet.header.IEEE802dot11_RADIOTAP]
Reading 1 packet...
Packet caplen=104 wirelen=104
id=1 name=TSFT is_present=0 present_bitmap=0x482E optionsBitmap=0x0 pad=0 offset of next field=8 length=0  
[... snip ...]
id=14 name=DB_ANTENNA_NOISE is_present=0 present_bitmap=0x482E optionsBitmap=0x105C pad=0 offset of next field=16 length=0  

Exception in thread "main" java.lang.NullPointerException
	at org.jnetpcap.packet.structure.JField.getLength(JField.java:238)
	at org.jnetpcap.packet.format.JFormatter.stylizeBitField(JFormatter.java:508)
	at org.jnetpcap.packet.format.JFormatter.stylizeSingleLine(JFormatter.java:609)
	at org.jnetpcap.packet.format.TextFormatter.fieldBefore(TextFormatter.java:94)
	at org.jnetpcap.packet.format.JFormatter.format(JFormatter.java:274)
	at org.jnetpcap.packet.format.JFormatter.format(JFormatter.java:278)
	at org.jnetpcap.packet.format.JFormatter.format(JFormatter.java:304)
	at org.jnetpcap.packet.format.JFormatter.format(JFormatter.java:254)
	at org.jnetpcap.packet.format.JFormatter.format(JFormatter.java:347)
	at org.jnetpcap.packet.format.JFormatter.format(JFormatter.java:316)
	at org.jnetpcap.packet.JPacket.toString(JPacket.java:694)
	at de.fuberlin.mi.cst.WiFiClipboard.WiFiClipboard.nextPacket(WiFiClipboard.java:39)
	at org.jnetpcap.Pcap.loop(Native Method)
	at org.jnetpcap.Pcap.loop(Pcap.java:1947)
	at de.fuberlin.mi.cst.WiFiClipboard.WiFiClipboard.testRadiotap(WiFiClipboard.java:19)
	at de.fuberlin.mi.cst.WiFiClipboard.WiFiClipboard.main(WiFiClipboard.java:28)

Is there any way i can attach my source (IEEE802dot11_RADIOTAP.java) to this posting - it seems a little bit to much to just copy'n'paste it here.

Cheers

David

Mark Bednarczyk
Mark Bednarczyk's picture
Offline
Joined: 03/22/2008
After looking at your header,

After looking at your header, its a complex one at that, you are not registering it with JRegistry through normal means but forcing it to be a CORE protocol. Core protocols are expected to be debugged and don't report their header errors the same way that custom header do when using the JRegister.registry method.

Here are the errors I get when trying to register the header. Just a few messages since this is very long:

org.jnetpcap.packet.RegistryHeaderErrors: [IEEE802dot11_RADIOTAP.DataField_ANTENNA.ANTENNA] Missing 'offset' property. [@Field(offset=) or @FieldRuntime(FieldFunction.OFFSET)]
[IEEE802dot11_RADIOTAP.DataField_ANTENNA.ANTENNA] Missing 'length' property. [@Field(length=) or @FieldRuntime(FieldFunction.LENGTH)]
[IEEE802dot11_RADIOTAP.DataField_ANTENNA.] org.jnetpcap.packet.structure.AnnotatedMethodException: [IEEE802dot11_RADIOTAP.DataField_ANTENNA.] @HeaderLength annotated method not found [IEEE802dot11_RADIOTAP.DataField_Channel.] org.jnetpcap.packet.structure.AnnotatedMethodException: [IEEE802dot11_RADIOTAP.DataField_Channel.] @HeaderLength annotated method not found [IEEE802dot11_RADIOTAP.DataField_DBM_ANTENNA_NOISE.DBM_ANTENNA_NOISE] Missing 'offset' property. [@Field(offset=) or @FieldRuntime(FieldFunction.OFFSET)]
[IEEE802dot11_RADIOTAP.DataField_DBM_ANTENNA_NOISE.DBM_ANTENNA_NOISE] Missing 'length' property. [@Field(length=) or @FieldRuntime(FieldFunction.LENGTH)]

Need to define the missing field properties and @HeaderLength methods. I'll be glad to help if you get stuck.

Sly Technologies, Inc.
R&D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.