/*
This file is part of PacketDotNet
PacketDotNet is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PacketDotNet is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with PacketDotNet. If not, see .
*/
/*
* Copyright 2010 Chris Morgan
*/
using System;
namespace PacketDotNet
{
namespace Ieee80211
{
///
/// As defined by Airpcap.h
///
/// NOTE: PresentPosition may not be the only position present
/// as this the field can be extended if the high bit is set
///
public class RadioFields
{
/// Length of the version field
public readonly static int VersionLength = 1;
/// Length of the pad field
public readonly static int PadLength = 1;
/// Length of the length field
public readonly static int LengthLength = 2;
/// Length of the first present field (others may follow)
public readonly static int PresentLength = 4;
/// Position of the version field
public readonly static int VersionPosition = 0;
/// Position of the padding field
public readonly static int PadPosition;
/// Position of the length field
public readonly static int LengthPosition;
/// Position of the first present field
public readonly static int PresentPosition;
/// Default header length, assuming one present field entry
public readonly static int DefaultHeaderLength;
static RadioFields()
{
PadPosition = VersionPosition + VersionLength;
LengthPosition = PadPosition + PadLength;
PresentPosition = LengthPosition + LengthLength;
// default to the normal header size until the header length can be read
DefaultHeaderLength = PresentPosition + PresentLength;
}
}
}
};