Wireshark-dev: Re: [Wireshark-dev] DISSECTOR_ASSERT_NOT_REACHED in WLCCP decode...
From: "Kevin A. Noll" <spamknoll@xxxxxxxxxxxxx>
Date: Wed, 30 May 2007 09:17:59 -0400
 
I've attached:

1. the dissector code - packet-wlccp.c;
2. a sample capture of packets that throw the error - wlccp-err-packets.cap;
3. two decodes of the packets obtained from a Cisco device capable of
logging the packet details - (*.txt). These decodes are of the packets in
the .cap file.

Note that the logged decodes sometimes leave some details out, so that's
where you'll see comments in my code like "skip over some unknown stuff".
The patent applications for WLCCP referenced from the WireShark wiki are not
entirely accurate, but are decent supplemental references.

I've been compiling with the 0.99.5 tarball.

I appreciate any suggestions anyone may have.

Please don't laugh at how bad my code looks :-)

Thanks!

--kan--
--
Kevin A. Noll, KD4WOZ
CCIE, CCDP
Versatile, Inc.		


-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Joerg Mayer
Sent: Wednesday, May 30, 2007 2:48 AM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] DISSECTOR_ASSERT_NOT_REACHED in WLCCP decode...

On Tue, May 29, 2007 at 09:54:56AM -0400, Kevin A. Noll wrote:
> I am building on Suse Linux.

Me too.

> I'd be happy to post the entire dissector and a sample capture file if 
> someone has the time to look at it.

Yes please as long as the capture file isn't excessivly large.

Ciao
   Joerg

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev

Attachment: wlccp-err-packets.cap
Description: Binary data

Attachment: packet-wlccp.c
Description: Binary data

2007/04/18 15:26:19 WLCCP Message Listener: SAP=4 MESSAGE: WlccpNmifMsgListener: Received message from IP = 10.160.128.158, Mask = 255.0.0.0:2887:
<WlccpMsg name="nmClientEventReport" sap="0x4" sapVersion="0x0" destNodeType="0x10" type="0x30" length="66" >
<field name="nmVersion" value="1" />
<field name="messageID" value="0x11c6" />
<field name="flags" value="0x6080" />
<field name="origNodeId" >
<WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />
</field>
<field name="respNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="timestamp" value="0x1176909918748" />
<WlccpTlv name="mic" groupID="0x1" typeID="0x8" isRequest="N" isEncrypted="N" isContainer="N" length="30" >
<field name="msgSeqCount" value="3402" />
<field name="micLength" value="16" />
<array name="mic" numElements="16" >
<element index="0">
0x91
</element>
<element index="1">
0x2f
</element>
<element index="2">
0x82
</element>
<element index="3">
0xca
</element>
<element index="4">
0x96
</element>
<element index="5">
0xc2
</element>
<element index="6">
0x60
</element>
<element index="7">
0x61
</element>
<element index="8">
0xaa
</element>
<element index="9">
0x94
</element>
<element index="10">
0x5e
</element>
<element index="11">
0xf6
</element>
<element index="12">
0x10
</element>
<element index="13">
0xc4
</element>
<element index="14">
0x9
</element>
<element index="15">
0x87
</element>
</array>
</WlccpTlv>
</WlccpMsg>

2007/04/18 15:26:19 WLCCP Message Listener: SAP=4 MESSAGE: WlccpNmifMsgListener: Sending message to /10.160.128.158:2887:
<WlccpMsg name="nmAck" sap="0x4" sapVersion="0x0" destNodeType="0x2" type="0x1" length="58" >
<field name="nmVersion" value="1" />
<field name="messageID" value="0x11c6" />
<field name="flags" value="0x2080" />
<field name="origNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="respNodeId" >
<WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />
</field>
<WlccpTlv name="mic" groupID="0x1" typeID="0x8" isRequest="N" isEncrypted="N" isContainer="N" length="30" >
<field name="msgSeqCount" value="3401" />
<field name="micLength" value="16" />
<array name="mic" numElements="16" >
<element index="0">
0xe6
</element>
<element index="1">
0x19
</element>
<element index="2">
0x52
</element>
<element index="3">
0x69
</element>
<element index="4">
0xd0
</element>
<element index="5">
0x51
</element>
<element index="6">
0x86
</element>
<element index="7">
0x31
</element>
<element index="8">
0x9e
</element>
<element index="9">
0xae
</element>
<element index="10">
0x30
</element>
<element index="11">
0x2
</element>
<element index="12">
0x37
</element>
<element index="13">
0x7d
</element>
<element index="14">
0x32
</element>
<element index="15">
0x69
</element>
</array>
</WlccpTlv>
</WlccpMsg>
packets 1253 1255 1258 1259 in rogue-detect_00011_20070418112331.cap


2007/04/18 16:49:50 WLCCP Message Listener: SAP=0 MESSAGE: WlccpNmifMsgListener: Sending message to /10.160.128.158:2887:
<WlccpMsg name="cmPathInit" sap="0x0" sapVersion="0x1" destNodeType="0x8" type="0xc" length="112" >
<field name="hopCount" value="0" />
<field name="messageID" value="0x1e8" />
<field name="flags" value="0x6100" />
<field name="origNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="respNodeId" >
<WlccpNodeId type="0x8" address="00-1a-2f-2e-7f-16" />
</field>
<field name="relayNodeId" >
<WlccpNodeId type="0x0" address="00-00-00-00-00-00" />
</field>
<field name="requNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="status" value="0x0" />
<WlccpTlv name="initSession" groupID="0x1" typeID="0x1" isRequest="N" isEncrypted="N" isContainer="Y" length="66" >
<field name="pathLength" value="0" />
<WlccpTlv name="inSecureContextReq" groupID="0x1" typeID="0x2" isRequest="N" isEncrypted="N" isContainer="N" length="58" >
<field name="keySeqCount" value="1" />
<field name="dstNodeId" >
<WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />
</field>
<field name="suppNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="keyMgmtType" value="0" />
<array name="nonce" numElements="32" >
<element index="0">
0xc2
</element>
<element index="1">
0xcc
</element>
<element index="2">
0x81
</element>
<element index="3">
0x29
</element>
<element index="4">
0xf7
</element>
<element index="5">
0x9e
</element>
<element index="6">
0xb2
</element>
<element index="7">
0xdc
</element>
<element index="8">
0x7d
</element>
<element index="9">
0xe3
</element>
<element index="10">
0xfd
</element>
<element index="11">
0xb5
</element>
<element index="12">
0x7e
</element>
<element index="13">
0x62
</element>
<element index="14">
0xc8
</element>
<element index="15">
0x28
</element>
<element index="16">
0x71
</element>
<element index="17">
0xee
</element>
<element index="18">
0xba
</element>
<element index="19">
0x2d
</element>
<element index="20">
0x87
</element>
<element index="21">
0x87
</element>
<element index="22">
0xad
</element>
<element index="23">
0x34
</element>
<element index="24">
0x2c
</element>
<element index="25">
0x4f
</element>
<element index="26">
0xa2
</element>
<element index="27">
0x6b
</element>
<element index="28">
0x22
</element>
<element index="29">
0x7f
</element>
<element index="30">
0x66
</element>
<element index="31">
0x68
</element>
</array>
</WlccpTlv>
</WlccpTlv>
</WlccpMsg>

2007/04/18 16:49:51 WLCCP Message Listener: SAP=0 MESSAGE: WlccpNmifMsgListener: Received message from IP = 10.160.128.158, Mask = 255.0.0.0:2887:
<WlccpMsg name="cmPathInit" sap="0x0" sapVersion="0x1" destNodeType="0x10" type="0x4c" length="144" >
<field name="hopCount" value="0" />
<field name="messageID" value="0x1e8" />
<field name="flags" value="0x2100" />
<field name="origNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="respNodeId" >
<WlccpNodeId type="0x8" address="00-1a-2f-2e-7f-16" />
</field>
<field name="relayNodeId" >
<WlccpNodeId type="0x0" address="00-00-00-00-00-00" />
</field>
<field name="requNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="status" value="0x0" />
<WlccpTlv name="initSession" groupID="0x1" typeID="0x1" isRequest="N" isEncrypted="N" isContainer="Y" length="98" >
<field name="pathLength" value="1" />
<WlccpTlv name="inSecureContextReply" groupID="0x1" typeID="0xa" isRequest="N" isEncrypted="N" isContainer="Y" length="90" >
<field name="keySeqCount" value="1" />
<field name="dstNodeId" >
<WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />
</field>
<field name="suppNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<array name="nonce" numElements="32" >
<element index="0">
0xca
</element>
<element index="1">
0x5a
</element>
<element index="2">
0xd8
</element>
<element index="3">
0x96
</element>
<element index="4">
0x63
</element>
<element index="5">
0x2d
</element>
<element index="6">
0xdf
</element>
<element index="7">
0x38
</element>
<element index="8">
0x82
</element>
<element index="9">
0xf2
</element>
<element index="10">
0x7e
</element>
<element index="11">
0x5f
</element>
<element index="12">
0x6f
</element>
<element index="13">
0x56
</element>
<element index="14">
0x76
</element>
<element index="15">
0x54
</element>
<element index="16">
0x9f
</element>
<element index="17">
0x42
</element>
<element index="18">
0x35
</element>
<element index="19">
0xe4
</element>
<element index="20">
0x65
</element>
<element index="21">
0x8f
</element>
<element index="22">
0x75
</element>
<element index="23">
0x74
</element>
<element index="24">
0x79
</element>
<element index="25">
0x7f
</element>
<element index="26">
0xb3
</element>
<element index="27">
0xef
</element>
<element index="28">
0x6
</element>
<element index="29">
0x53
</element>
<element index="30">
0x98
</element>
<element index="31">
0x9d
</element>
</array>
<field name="sessionTimeout" value="0" />
</array>
<WlccpTlv name="mic" groupID="0x1" typeID="0x8" isRequest="N" isEncrypted="N" isContainer="N" length="30" >
<field name="msgSeqCount" value="2" />
<field name="micLength" value="16" />
<array name="mic" numElements="16" >
<element index="0">
0xad
</element>
<element index="1">
0xb2
</element>
<element index="2">
0x15
</element>
<element index="3">
0xca
</element>
<element index="4">
0x6b
</element>
<element index="5">
0x36
</element>
<element index="6">
0xb4
</element>
<element index="7">
0xb2
</element>
<element index="8">
0x93
</element>
<element index="9">
0xb7
</element>
<element index="10">
0x6a
</element>
<element index="11">
0xf
</element>
<element index="12">
0x9f
</element>
<element index="13">
0x14
</element>
<element index="14">
0xb9
</element>
<element index="15">
0x62
</element>
</array>
</WlccpTlv>
</WlccpTlv>
</WlccpTlv>
</WlccpMsg>

2007/04/18 16:49:51 WLCCP Message Listener: SAP=0 MESSAGE: NMTopoListener: Authenticated with <WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />, EAP Session ID=3, KSC=1
2007/04/18 16:49:51 WLCCP Message Listener: SAP=0 MESSAGE: WlccpNmifMsgListener: Sending message to /10.160.128.158:2887:
<WlccpMsg name="cmPathInit" sap="0x0" sapVersion="0x1" destNodeType="0x8" type="0x8c" length="134" >
<field name="hopCount" value="0" />
<field name="messageID" value="0x1e8" />
<field name="flags" value="0x6100" />
<field name="origNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="respNodeId" >
<WlccpNodeId type="0x8" address="00-1a-2f-2e-7f-16" />
</field>
<field name="relayNodeId" >
<WlccpNodeId type="0x0" address="00-00-00-00-00-00" />
</field>
<field name="requNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="status" value="0x0" />
<WlccpTlv name="authenticator" groupID="0x1" typeID="0x6" isRequest="N" isEncrypted="N" isContainer="Y" length="88" >
<field name="dstNodeId" >
<WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />
</field>
<field name="srcNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="keySeqCount" value="1" />
<field name="status" value="22" />
<array name="nonce" numElements="32" >
<element index="0">
0xcf
</element>
<element index="1">
0xf7
</element>
<element index="2">
0xc1
</element>
<element index="3">
0x93
</element>
<element index="4">
0x88
</element>
<element index="5">
0x55
</element>
<element index="6">
0x43
</element>
<element index="7">
0xc6
</element>
<element index="8">
0x94
</element>
<element index="9">
0x43
</element>
<element index="10">
0x73
</element>
<element index="11">
0xe5
</element>
<element index="12">
0x5f
</element>
<element index="13">
0xab
</element>
<element index="14">
0x4d
</element>
<element index="15">
0x5a
</element>
<element index="16">
0xa0
</element>
<element index="17">
0x6b
</element>
<element index="18">
0x9e
</element>
<element index="19">
0x5e
</element>
<element index="20">
0x33
</element>
<element index="21">
0x7e
</element>
<element index="22">
0x4a
</element>
<element index="23">
0xc1
</element>
<element index="24">
0xe7
</element>
<element index="25">
0xb4
</element>
<element index="26">
0x46
</element>
<element index="27">
0x40
</element>
<element index="28">
0x7c
</element>
<element index="29">
0x1a
</element>
<element index="30">
0x93
</element>
<element index="31">
0x10
</element>
</array>
<WlccpTlv name="mic" groupID="0x1" typeID="0x8" isRequest="N" isEncrypted="N" isContainer="N" length="30" >
<field name="msgSeqCount" value="3" />
<field name="micLength" value="16" />
<array name="mic" numElements="16" >
<element index="0">
0x35
</element>
<element index="1">
0x88
</element>
<element index="2">
0x4
</element>
<element index="3">
0x0
</element>
<element index="4">
0x9f
</element>
<element index="5">
0x99
</element>
<element index="6">
0x4a
</element>
<element index="7">
0xe7
</element>
<element index="8">
0xd1
</element>
<element index="9">
0x61
</element>
<element index="10">
0xdb
</element>
<element index="11">
0xd
</element>
<element index="12">
0x2d
</element>
<element index="13">
0xb1
</element>
<element index="14">
0xe6
</element>
<element index="15">
0xf0
</element>
</array>
</WlccpTlv>
</WlccpTlv>
</WlccpMsg>

2007/04/18 16:49:52 WLCCP Message Listener: SAP=0 MESSAGE: WlccpNmifMsgListener: Received message from IP = 10.160.128.158, Mask = 255.0.0.0:2887:
<WlccpMsg name="cmPathInit" sap="0x0" sapVersion="0x1" destNodeType="0x10" type="0xcc" length="134" >
<field name="hopCount" value="0" />
<field name="messageID" value="0x1e8" />
<field name="flags" value="0x2100" />
<field name="origNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="respNodeId" >
<WlccpNodeId type="0x8" address="00-1a-2f-2e-7f-16" />
</field>
<field name="relayNodeId" >
<WlccpNodeId type="0x0" address="00-00-00-00-00-00" />
</field>
<field name="requNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="status" value="0x0" />
<WlccpTlv name="authenticator" groupID="0x1" typeID="0x6" isRequest="N" isEncrypted="N" isContainer="Y" length="88" >
<field name="dstNodeId" >
<WlccpNodeId type="0x2" address="00-1a-2f-2e-7f-16" />
</field>
<field name="srcNodeId" >
<WlccpNodeId type="0x10" address="00-16-36-d3-30-a5" />
</field>
<field name="keySeqCount" value="1" />
<field name="status" value="225" />
<array name="nonce" numElements="32" >
<element index="0">
0xce
</element>
<element index="1">
0x6f
</element>
<element index="2">
0x88
</element>
<element index="3">
0x6b
</element>
<element index="4">
0x26
</element>
<element index="5">
0x5c
</element>
<element index="6">
0x5a
</element>
<element index="7">
0xcd
</element>
<element index="8">
0x10
</element>
<element index="9">
0xe7
</element>
<element index="10">
0xec
</element>
<element index="11">
0x1f
</element>
<element index="12">
0x22
</element>
<element index="13">
0xda
</element>
<element index="14">
0x97
</element>
<element index="15">
0x23
</element>
<element index="16">
0xeb
</element>
<element index="17">
0x71
</element>
<element index="18">
0xe8
</element>
<element index="19">
0x83
</element>
<element index="20">
0xde
</element>
<element index="21">
0xf9
</element>
<element index="22">
0x79
</element>
<element index="23">
0xf9
</element>
<element index="24">
0x92
</element>
<element index="25">
0x59
</element>
<element index="26">
0xc4
</element>
<element index="27">
0x8a
</element>
<element index="28">
0xd3
</element>
<element index="29">
0xa8
</element>
<element index="30">
0x8a
</element>
<element index="31">
0x47
</element>
</array>
<WlccpTlv name="mic" groupID="0x1" typeID="0x8" isRequest="N" isEncrypted="N" isContainer="N" length="30" >
<field name="msgSeqCount" value="4" />
<field name="micLength" value="16" />
<array name="mic" numElements="16" >
<element index="0">
0xe
</element>
<element index="1">
0x49
</element>
<element index="2">
0xf7
</element>
<element index="3">
0xda
</element>
<element index="4">
0xd0
</element>
<element index="5">
0x4d
</element>
<element index="6">
0x62
</element>
<element index="7">
0x3b
</element>
<element index="8">
0xf2
</element>
<element index="9">
0x4d
</element>
<element index="10">
0x1c
</element>
<element index="11">
0x8a
</element>
<element index="12">
0x89
</element>
<element index="13">
0xb9
</element>
<element index="14">
0x8d
</element>
<element index="15">
0xdc
</element>
</array>
</WlccpTlv>
</WlccpTlv>
</WlccpMsg>