Permalink
Browse files

Rename radiotap record field

  • Loading branch information...
1 parent 0583ed4 commit 5a3234e441a1b3b0f7ee6f4590cd1d7fb513d865 @msantos committed Aug 2, 2011
Showing with 7 additions and 7 deletions.
  1. +1 −1 include/wierl_frame.hrl
  2. +6 −6 src/wierl_radiotap.erl
View
@@ -49,7 +49,7 @@
pad = 0,
len = 0,
present = [],
- unknown = <<>>
+ rest = <<>>
}).
-record(ieee802_11_fc, {
View
@@ -56,28 +56,28 @@ header(<<Version:8, Pad:8, Len:?UINT16LE,
Size = Len-8,
<<Header:Size/bytes, Data/binary>> = Frame,
- {Extensions, Unknown} = extension(Present, Header),
+ {Extensions, Rest} = extension(Present, Header),
{#ieee802_11_radiotap{
version = Version,
pad = Pad,
len = Len,
present = Extensions,
- unknown = Unknown
+ rest = Rest
}, Data};
header(#ieee802_11_radiotap{
version = Version,
pad = Pad,
len = Len,
present = Extensions,
- unknown = Unknown
+ rest = Rest
}) ->
{Bitmap, Header} = extension(Extensions),
<<Version:8, Pad:8, Len:?UINT16LE,
Bitmap:?UINT32LE,
- Header/bytes, Unknown/binary>>.
+ Header/bytes, Rest/binary>>.
extension(Bitmap, Extensions) when is_integer(Bitmap), is_binary(Extensions) ->
@@ -130,14 +130,14 @@ extension(Bitmap, Extensions) when is_integer(Bitmap), is_binary(Extensions) ->
{ext, Ext}
], V == 1 ],
- {Header, Unknown} = lists:foldl(
+ {Header, Rest} = lists:foldl(
fun (Type, {Field, Data}) ->
{Decoded, Rest} = field(Type, Data),
{[Decoded|Field], Rest}
end,
{[], Extensions}, Present),
- {lists:reverse(Header), Unknown}.
+ {lists:reverse(Header), Rest}.
extension(Extensions) when is_list(Extensions) ->

0 comments on commit 5a3234e

Please sign in to comment.