Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
b5859862
Commit
b5859862
authored
16 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Packets: Really fix WLANPacket desaster
parent
93356d23
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Packets/80211Bundle/WLANPacket.hh
+14
-11
14 additions, 11 deletions
Packets/80211Bundle/WLANPacket.hh
doclib/pkgdraw
+5
-1
5 additions, 1 deletion
doclib/pkgdraw
with
19 additions
and
12 deletions
Packets/80211Bundle/WLANPacket.hh
+
14
−
11
View file @
b5859862
...
...
@@ -40,10 +40,11 @@ namespace senf
{
# include SENF_FIXED_PARSER()
SENF_PARSER_PRIVATE_BITFIELD
(
subtype
,
4
,
unsigned
);
SENF_PARSER_SKIP_BITS
(
4
);
//skip type and version
SENF_PARSER_PRIVATE_BITFIELD
(
subtype
,
4
,
unsigned
);
//<pkgdraw: hide
//skip type and version
SENF_PARSER_SKIP_BITS
(
4
);
//<pkgdraw: hide
//jump to fist address field
SENF_PARSER_SKIP
(
3
);
SENF_PARSER_SKIP
(
3
);
//<pkgdraw: hide
SENF_PARSER_FIELD
(
destinationAddress
,
MACAddressParser
);
SENF_PARSER_FIELD
(
sourceAddress
,
MACAddressParser
);
SENF_PARSER_FIELD
(
bssid
,
MACAddressParser
);
...
...
@@ -73,10 +74,11 @@ namespace senf
{
# include SENF_PARSER()
SENF_PARSER_PRIVATE_BITFIELD
(
subtype
,
4
,
unsigned
);
SENF_PARSER_SKIP_BITS
(
4
);
//skip type and version
SENF_PARSER_PRIVATE_BITFIELD
(
subtype
,
4
,
unsigned
);
//<pkgdraw: hide
//skip type and version
SENF_PARSER_SKIP_BITS
(
4
);
//<pkgdraw: hide
//jump to fist address field
SENF_PARSER_SKIP
(
3
,
3
);
SENF_PARSER_SKIP
(
3
,
3
);
//<pkgdraw: hide
SENF_PARSER_FIELD
(
receiverAddress
,
MACAddressParser
);
//only RTS frame contains a source address field
...
...
@@ -99,16 +101,16 @@ namespace senf
struct
WLANPacket_DataFrameParser
:
public
senf
::
PacketParserBase
{
# include SENF_PARSER()
SENF_PARSER_PRIVATE_BITFIELD
(
subtype
,
4
,
unsigned
);
SENF_PARSER_PRIVATE_BITFIELD
(
subtype
,
4
,
unsigned
);
//<pkgdraw: hide
//jump to 'toDS' and 'fromDS' bits
//skip type and version
SENF_PARSER_SKIP_BITS
(
4
);
SENF_PARSER_SKIP_BITS
(
4
);
//<pkgdraw: hide
//skip other flags
SENF_PARSER_SKIP_BITS
(
6
);
SENF_PARSER_SKIP_BITS
(
6
);
//<pkgdraw: hide
//needed in data frames due to the variable address fields
SENF_PARSER_PRIVATE_BITFIELD
(
dsBits
,
2
,
unsigned
);
SENF_PARSER_PRIVATE_BITFIELD
(
dsBits
,
2
,
unsigned
);
//<pkgdraw: hide
//skip duration field
SENF_PARSER_SKIP
(
2
,
0
);
SENF_PARSER_SKIP
(
2
,
2
);
//<pkgdraw: hide
SENF_PARSER_PRIVATE_FIELD
(
addr1
,
MACAddressParser
);
SENF_PARSER_PRIVATE_FIELD
(
addr2
,
MACAddressParser
);
...
...
@@ -206,6 +208,7 @@ namespace senf
\par Fields:
\ref WLANPacketParser
\image html WLANPacket.png
\ingroup protocolbundle_80211
*/
...
...
This diff is collapsed.
Click to expand it.
doclib/pkgdraw
+
5
−
1
View file @
b5859862
...
...
@@ -386,7 +386,11 @@ def scanFields(data):
del
field
[
'
size
'
]
else
:
field
[
'
size
'
]
=
int
(
flags
[
'
size
'
])
fields
.
append
(
field
)
if
not
field
[
'
name
'
]
and
fields
and
not
fields
[
-
1
][
'
name
'
]
\
and
field
.
has_key
(
'
size
'
)
and
fields
[
-
1
].
has_key
(
'
size
'
):
fields
[
-
1
][
'
size
'
]
+=
field
[
'
size
'
]
else
:
fields
.
append
(
field
)
else
:
sys
.
stderr
.
write
(
"
Unknown parser type: %s
\n
"
%
tp
)
return
fields
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment