Class IPv6SegmentRoutingHeader

The IPv6SegmentRoutingHeader Layer, inherits from Base_Object

Tables

IPv6SegmentRoutingHeader.new_args Constructor arguments

Methods

IPv6SegmentRoutingHeader:setsegments (segments) Set the segment list
IPv6SegmentRoutingHeader:setpolicies (segments) Set the policy list
IPv6SegmentRoutingHeader:sethmac (hmac) Set the HMAC field
IPv6SegmentRoutingHeader:new ([args]) Constructor for an IPv6SegmentRoutingHeader Layer
IPv6SegmentRoutingHeader:segmentleft () Set the number of segment left to be processed in the segment list
IPv6SegmentRoutingHeader:cflag () Set the cleanup flag
IPv6SegmentRoutingHeader:pflag () Set the protected flag
IPv6SegmentRoutingHeader:hmackey () Set the hmac key


Tables

IPv6SegmentRoutingHeader.new_args
Constructor arguments

Fields:

Methods

IPv6SegmentRoutingHeader:setsegments (segments)
Set the segment list

Parameters:

  • segments table a list IPv6Addresses (strings)

Usage:

     srh:setsegments{
       '2001:db8:1234::1',
       '2001:db8:5678::1',
       '2001:db8:9abc::1'
     }
IPv6SegmentRoutingHeader:setpolicies (segments)
Set the policy list

Parameters:

  • segments table a list of pairs {type=num, value=string} for all 4 policies

Usage:

     srh:setpolicies{
       {type=IPv6SegmentRoutingHeader.policy_destination, value='2001:db8::1'},
       {type=IPv6SegmentRoutingHeader.policy_source, value='2001:db8::2'},
     }
IPv6SegmentRoutingHeader:sethmac (hmac)
Set the HMAC field

Parameters:

  • hmac table a list of at most 32 bytes for the HMAC value, 0-padded

Usage:

    srh:sethmac{0x1, 0x2, 0x3, 0x4, ...}
IPv6SegmentRoutingHeader:new ([args])
Constructor for an IPv6SegmentRoutingHeader Layer

Parameters:

  • args table arguments, all grouped inside a table, see new_args (optional)

Returns:

    IPv6SegmentRoutingHeader a new IPv6SegmentRoutingHeader object

Usage:

     IPv6SegmentRoutingHeader.new{
       segmentleft=3,
       cflag=1,
       segments={ '2001:db8::1', '2001:db8::2' },
       hmackey=4,
       hmac={ 0xe, 0xa, 0x12 } -- will be 0-padded
     }
IPv6SegmentRoutingHeader:segmentleft ()
Set the number of segment left to be processed in the segment list
IPv6SegmentRoutingHeader:cflag ()
Set the cleanup flag
IPv6SegmentRoutingHeader:pflag ()
Set the protected flag
IPv6SegmentRoutingHeader:hmackey ()
Set the hmac key
generated by LDoc 1.4.3 Last updated 2015-05-04 17:26:47