Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jwimaxsa Class Reference
Inheritance diagram for ProtocolPP::jwimaxsa:
Collaboration diagram for ProtocolPP::jwimaxsa:

Public Member Functions

 jwimaxsa ()
 
 jwimaxsa (direction_t dir, wimaxmode_t mode, cipher_t cipher, uint8_t type, uint8_t eks, uint8_t fid, uint16_t cid, uint32_t pn, uint32_t ckeylen, std::shared_ptr< jarray< uint8_t >> cipherkey, uint32_t arlen, jarray< uint8_t > arwin, bool eh, bool ht, bool ec, bool esf, bool ci)
 
 jwimaxsa (jwimaxsa &rhs)
 
 jwimaxsa (std::shared_ptr< jwimaxsa > &rhs)
 
 ~jwimaxsa ()
 Standard deconstructor.
 
template<typename T >
void set_field (field_t field, T fieldval)
 
template<typename T >
get_field (field_t field)
 
void to_xml (tinyxml2::XMLPrinter &myxml, direction_t direction)
 
void to_json (std::ofstream &myjson, direction_t direction, std::string &indent)
 
 jwimaxsa (const jwimaxsa &rhs)=delete
 
- Public Member Functions inherited from ProtocolPP::jsecass
 jsecass ()
 
virtual ~jsecass ()=default
 Standard deconstructor.
 
 jsecass (jsecass &jsecass)=delete
 
 jsecass (const jsecass &jsecass)=delete
 

Constructor & Destructor Documentation

◆ jwimaxsa() [1/4]

ProtocolPP::jwimaxsa::jwimaxsa ( )

Standard Constructor

WIMAX Defaults
fieldDefault Value
dirdirection_t::ENCAP
modewimaxmode_t::OFDM
ciphercipher_t::AES_CCM
authauth_t::SHA256
type0
eks0
fid0
cid0
pn0
ckeylen16
cipherkey0
arlen0
arwin0
ehfalse
htfalse
ectrue
esffalse
citrue

◆ jwimaxsa() [2/4]

ProtocolPP::jwimaxsa::jwimaxsa ( direction_t  dir,
wimaxmode_t  mode,
cipher_t  cipher,
uint8_t  type,
uint8_t  eks,
uint8_t  fid,
uint16_t  cid,
uint32_t  pn,
uint32_t  ckeylen,
std::shared_ptr< jarray< uint8_t >>  cipherkey,
uint32_t  arlen,
jarray< uint8_t >  arwin,
bool  eh,
bool  ht,
bool  ec,
bool  esf,
bool  ci 
)

Security Association for Wimax

Parameters
dir- Direction of processing (ENCAP or DECAP)
mode- Mode of operation (OFDM, OFDMA, AGHM_OFDM, AGHM_OFDMA)
cipher- Encryption (AES_CCM, SM4_CCM, NULL_CIPHER)
type- types and subheaders in payload
eks- Encryption key sequence
cid- Connection Identifier
fid- Flow Identifier (AGHM header only)
pn- Packet number (for counter modes PN=ROC[7:0]|PN[23:0])
ckeylen- Length of the key
cipherkey- Key for the encryption algorithm
arlen- Number of packets to track in replay window
arwin- Anti-replay window for tracking packets
eh- Extended header group presence identifier (AGHM header only)
ht- Header type
ec- Encryption control
esf- Extended subheader present
ci- CRC Indicator

◆ jwimaxsa() [3/4]

ProtocolPP::jwimaxsa::jwimaxsa ( jwimaxsa rhs)

Copy constructor for wimax security association

Parameters
rhs- Security association (SA) for this wimax flow

◆ jwimaxsa() [4/4]

ProtocolPP::jwimaxsa::jwimaxsa ( std::shared_ptr< jwimaxsa > &  rhs)
explicit

Copy constructor for wimax security association from shared pointer

Parameters
rhs- Security association (SA) for this wimax flow

Member Function Documentation

◆ get_field()

template<typename T >
T ProtocolPP::jwimaxsa::get_field ( field_t  field)

Retrieve the field from the wimax header

WIMAX Get Fields
field typefield nameExample
direction_tDIRECTIONdirection_t mydir = get_field<direction_t>(field_t::DIRECTION)
wimaxmode_tMODEwimaxmode_t mymode = get_field<wimaxmode_t>(field_t::MODE)
cipher_tCIPHERcipher_t mycipher = get_field<cipher_t>(field_t::CIPHER)
boolEHbool myeh = get_field<bool>(field_t::EH)
HTbool myht = get_field<bool>(field_t::HT)
ECbool myec = get_field<bool>(field_t::EC)
ESFbool myesf = get_field<bool>(field_t::ESF)
CIbool myci = get_field<bool>(field_t::CI)
uint8_tTYPEuint8_t mytype = get_field<uint8_t>(field_t::TYPE)
EKSuint8_t myeks = get_field<uint8_t>(field_t::EKS)
FIDuint8_t myfid = get_field<uint8_t>(field_t::FID)
uint16_tCIDuint16_t mycid = get_field<uint16_t>(field_t::CID)
uint32_tPNuint32_t mypn = get_field<uint32_t>(field_t::PN)
CKEYLENuint32_t myckeylen = get_field<uint32_t>(field_t::CKEYLEN)
ARLENuint32_t myarlen = get_field<uint32_t>(field_t::ARLEN)
jarray<uint8_t>ARWINjarray<uint8_t> myarwin = get_field<jarray<uint8_t>>(field_t::ARWIN)
std::shared_ptr<jarray<uint8_t>>CIPHERKEYstd::shared_ptr<jarray<uint8_t>> myckey = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY)
Parameters
field- field to retrieve
Returns
field value

◆ set_field()

template<typename T >
void ProtocolPP::jwimaxsa::set_field ( field_t  field,
fieldval 
)

Update WIMAX field with the new value

WIMAX Set Fields
field typefield nameExample
direction_tDIRECTIONset_field<direction_t>(field_t::DIRECTION, direction_t::ENCAP)
wimaxmode_tMODEset_field<wimaxmode_t>(field_t::MODE, wimaxmode_t::OFDMA)
cipher_tCIPHERset_field<cipher_t>(field_t::CIPHER, cipher_t::AES_CCM)
boolEHset_field<bool>(field_t::EH, true)
HTset_field<bool>(field_t::HT, false)
ECset_field<bool>(field_t::EC, true)
ESFset_field<bool>(field_t::ESF, false)
CIset_field<bool>(field_t::CI, true)
uint8_tTYPEset_field<uint8_t>(field_t::TYPE, 0)
EKSset_field<uint8_t>(field_t::EKS, 0)
FIDset_field<uint8_t>(field_t::FID, 0)
uint16_tCIDset_field<uint16_t>(field_t::CID, 0)
uint32_tPNset_field<uint32_t>(field_t::PN, 1)
CKEYLENset_field<uint32_t>(field_t::CKEYLEN, 1)
ARLENset_field<uint32_t>(field_t::ARLEN, 1)
jarray<uint8_t>ARWINset_field<jarray<uint8_t>>(field_t::ARWIN, jarray<uint8_t>("000000000000000001")
std::shared_ptr<jarray<uint8_t>>CIPHERKEYset_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY, std::shared_ptr<jarray<uint8_t>>("000000000000000001"))
Parameters
field- field to update
fieldval- new value for the field

◆ to_json()

void ProtocolPP::jwimaxsa::to_json ( std::ofstream &  myjson,
direction_t  direction,
std::string &  indent 
)
virtual

Print the protocol and security objects to JSON

Parameters
myjson- JSON object for printing
direction- facilitator for random generation
indent- indentation for JSON output

Implements ProtocolPP::jsecass.

◆ to_xml()

void ProtocolPP::jwimaxsa::to_xml ( tinyxml2::XMLPrinter myxml,
direction_t  direction 
)
virtual

Print the protocol and security objects to XML

Parameters
myxml- XMLPrinter object for printing
direction- facilitator for random generation

Implements ProtocolPP::jsecass.


The documentation for this class was generated from the following file: