Sha256: 071a609d27a0d62a5a94f52a2b331c4775bbd675a0a9bee8f0cf052e437b6d41
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
# coding: utf-8 # frozen_string_literal: true # This file is part of IPsec packetgen plugin. # See https://github.com/sdaubert/packetgen-plugin-ipsec for more informations # Copyright (c) 2018 Sylvain Daubert <sylvain.daubert@laposte.net> # This program is published under MIT license. module PacketGen::Plugin class IKE # This class handles Vendor ID payloads, as defined in RFC 7296 ยง3.12. # # A Vendor ID payload contains a generic payload Plugin (see {Payload}) # and data field (type {PacketGen::Types::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 | # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ # | | # ~ VendorID Data ~ # | | # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ # # == Create a Vendor ID payload # # Create a IKE packet with a Vendor ID payload # pkt = PacketGen.gen('IP').add('UDP').add('IKE') # pkt.add('IKE::VendorID', data: "abcdefgh") # @author Sylvain Daubert class VendorID < Payload # Payload type number PAYLOAD_TYPE = 43 end end PacketGen::Header.add_class IKE::VendorID end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
packetgen-plugin-ipsec-1.0.3 | lib/packetgen/plugin/ike/vendor_id.rb |