summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-01-08 17:21:28 (UTC)
committer mickeyl <mickeyl>2004-01-08 17:21:28 (UTC)
commit9634c11f8ea28af19a4afc6821c68cdc2b3e7c8a (patch) (side-by-side diff)
tree20fd8d9b8c17bad10fb43abf7fb7bbde28ea2c8b
parentde345d45e2336a67d837d342e6686266a25e9d58 (diff)
downloadopie-9634c11f8ea28af19a4afc6821c68cdc2b3e7c8a.zip
opie-9634c11f8ea28af19a4afc6821c68cdc2b3e7c8a.tar.gz
opie-9634c11f8ea28af19a4afc6821c68cdc2b3e7c8a.tar.bz2
add parsing of ProbeRequests
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/opcap.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index 4d786f5..7463320 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -724,8 +724,12 @@ OWaveLanManagementPacket::OWaveLanManagementPacket( const unsigned char* end, co
odebug << "OWaveLanManagementPacket::OWaveLanManagementPacket(): decoding frame..." << oendl;
odebug << "Detected subtype is " << managementType() << oendl;
- // grab tagged values
- const unsigned char* ptr = (const unsigned char*) (_body+1);
+ // Grab tagged values.
+ // Beacons contain a 12 byte long fixed parameters set before the tagged parameters come,
+ // Other management frames don't - which is why we have to inspect the subtype here.
+
+ const unsigned char* ptr = managementType() == "Beacon" ? (const unsigned char*) (_body+1) : (const unsigned char*) (_header+1);
+
while (ptr < end)
{
switch ( *ptr )