Class: PacketGen::Plugin::IKE::Nonce

Inherits:
Payload
  • Object
show all
Defined in:
lib/packetgen/plugin/ike/nonce.rb

Overview

This class handles Nonce payloads, as defined in RFC 7296 §3.9.

A Nonce payload contains a generic payload Plugin (see Payload) and data field (type BinStruct::String): 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Payload |C| RESERVED | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Nonce Data ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Create a Nonce payload

Create a IKE packet with a Nonce payload

pkt = PacketGen.gen('IP').add('UDP').add('IKE') pkt.add('IKE::Nonce', data: "abcdefgh") pkt.calc_length

Constant Summary collapse

PAYLOAD_TYPE =

Payload type number

40

Instance Attribute Summary

Attributes inherited from Payload

#content, #critical, #flags, #hreserved, #length, #next

Method Summary

Methods inherited from Payload

#calc_length, #initialize, protocol_name

Constructor Details

This class inherits a constructor from PacketGen::Plugin::IKE::Payload