Documentation ¶
Overview ¶
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Index ¶
- Constants
- Variables
- type ArgsMobSession
- func (a *ArgsMobSession) Marshal() ([]byte, error)
- func (a *ArgsMobSession) MarshalLen() int
- func (a *ArgsMobSession) MarshalTo(b []byte) error
- func (a *ArgsMobSession) PDUSessionID() uint32
- func (a *ArgsMobSession) QFI() uint8
- func (a *ArgsMobSession) R() bool
- func (a *ArgsMobSession) U() bool
- func (a *ArgsMobSession) UnmarshalBinary(b []byte) error
- type MGTP4IPv6DstFields
- func (e *MGTP4IPv6DstFields) ArgsMobSession() *ArgsMobSession
- func (e *MGTP4IPv6DstFields) IPv4() net.IP
- func (a *MGTP4IPv6DstFields) Marshal() ([]byte, error)
- func (a *MGTP4IPv6DstFields) MarshalLen() int
- func (a *MGTP4IPv6DstFields) MarshalTo(b []byte) error
- func (a *MGTP4IPv6DstFields) PDUSessionID() uint32
- func (e *MGTP4IPv6DstFields) Prefix() netip.Prefix
- func (e *MGTP4IPv6DstFields) QFI() uint8
- func (e *MGTP4IPv6DstFields) R() bool
- func (e *MGTP4IPv6DstFields) U() bool
- type MGTP4IPv6SrcFields
Constants ¶
const ARGS_MOB_SESSION_SIZE_BIT = ARGS_MOB_SESSION_SIZE_BYTE * 8
const ARGS_MOB_SESSION_SIZE_BYTE = 5
const IPV4_ADDR_SIZE_BIT = IPV4_ADDR_SIZE_BYTE * 8
const IPV4_ADDR_SIZE_BYTE = 4
const IPV6_ADDR_SIZE_BIT = IPV6_ADDR_SIZE_BYTE * 8
const IPV6_ADDR_SIZE_BYTE = 16
const IPV6_LEN_ENCODING_MASK = (0xFF >> (8 - IPV6_LEN_ENCODING_SIZE_BIT)) // mask (decoding: after shift to right; encoding before shift to left)
const IPV6_LEN_ENCODING_POS_BIT = 0 // position from right of the byte in bits
const IPV6_LEN_ENCODING_POS_BYTE = 15 // position from left in bytes
const IPV6_LEN_ENCODING_SIZE_BIT = 7
const QFI_MASK = (0xFF >> (8 - QFI_SIZE_BIT)) // mask (decoding: after shift to right; encoding before shift to left)
const QFI_POS_BIT = 2 // position from right of the byte in bits
const QFI_POS_BYTE = 0 // position from left in bytes
const QFI_SIZE_BIT = 6
const R_MASK = (0xFF >> (8 - R_SIZE_BIT)) // mask (decoding: after shift to right; encoding before shift to left)
const R_POS_BIT = 1 // position from right of the byte in bits
const R_POS_BYTE = 0 // position from left in bytes
const R_SIZE_BIT = 1
const TEID_POS_BYTE = 1
const TEID_SIZE_BIT = TEID_SIZE_BYTE * 8
const TEID_SIZE_BYTE = 4
const UDP_PORT_SIZE_BIT = UDP_PORT_SIZE_BYTE * 8
const UDP_PORT_SIZE_BYTE = 2
const U_MASK = (0xFF >> (8 - U_SIZE_BIT)) // mask (decoding: after shift to right; encoding before shift to left)
const U_POS_BIT = 0 // position from right of the byte in bits
const U_POS_BYTE = 0 // position from left in bytes
const U_SIZE_BIT = 1
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ArgsMobSession ¶
type ArgsMobSession struct {
// contains filtered or unexported fields
}
Args.Mob.Session as defined in draft-ietf-dmm-srv6-mobile-uplane-24, section 6.1
func NewArgsMobSession ¶
func NewArgsMobSession(qfi uint8, r bool, u bool, pduSessionID uint32) *ArgsMobSession
NewArgsMobSession creates an ArgsMobSession.
func ParseArgsMobSession ¶
func ParseArgsMobSession(b []byte) (*ArgsMobSession, error)
ParseArgsMobSession parses given byte sequence as an ArgsMobSession.
func (*ArgsMobSession) Marshal ¶
func (a *ArgsMobSession) Marshal() ([]byte, error)
Marshal returns the byte sequence generated from ArgsMobSession.
func (*ArgsMobSession) MarshalLen ¶
func (a *ArgsMobSession) MarshalLen() int
MarshalLen returns the serial length of Args.Mob.Session.
func (*ArgsMobSession) MarshalTo ¶
func (a *ArgsMobSession) MarshalTo(b []byte) error
MarshalTo puts the byte sequence in the byte array given as b.
func (*ArgsMobSession) PDUSessionID ¶
func (a *ArgsMobSession) PDUSessionID() uint32
PDUSessionID returns the PDU Session Identifier for this ArgsMobSession. The GTP-U equivalent is TEID.
func (*ArgsMobSession) QFI ¶
func (a *ArgsMobSession) QFI() uint8
QFI returns the Qos Flow Identifier for this ArgsMobSession.
func (*ArgsMobSession) R ¶
func (a *ArgsMobSession) R() bool
R returns the Reflective QoS Indication for this ArgsMobSession.
func (*ArgsMobSession) U ¶
func (a *ArgsMobSession) U() bool
U returns the U bit for this ArgsMobSession.
func (*ArgsMobSession) UnmarshalBinary ¶
func (a *ArgsMobSession) UnmarshalBinary(b []byte) error
UnmarshalBinary sets the values retrieved from byte sequence in an ArgsMobSession.
type MGTP4IPv6DstFields ¶
type MGTP4IPv6DstFields struct {
// contains filtered or unexported fields
}
func NewMGTP4IPv6DstFields ¶
func NewMGTP4IPv6DstFields(ipv6Addr []byte, prefixLength uint) (*MGTP4IPv6DstFields, error)
func NewMGTP4IPv6DstFieldsFromFields ¶
func NewMGTP4IPv6DstFieldsFromFields(prefix netip.Prefix, ipv4 []byte, a *ArgsMobSession) (*MGTP4IPv6DstFields, error)
func (*MGTP4IPv6DstFields) ArgsMobSession ¶
func (e *MGTP4IPv6DstFields) ArgsMobSession() *ArgsMobSession
func (*MGTP4IPv6DstFields) IPv4 ¶
func (e *MGTP4IPv6DstFields) IPv4() net.IP
func (*MGTP4IPv6DstFields) Marshal ¶
func (a *MGTP4IPv6DstFields) Marshal() ([]byte, error)
Marshal returns the byte sequence generated from MGTP4IPv6DstFields.
func (*MGTP4IPv6DstFields) MarshalLen ¶
func (a *MGTP4IPv6DstFields) MarshalLen() int
func (*MGTP4IPv6DstFields) MarshalTo ¶
func (a *MGTP4IPv6DstFields) MarshalTo(b []byte) error
MarshalTo puts the byte sequence in the byte array given as b. warning: no caching is done, this result will be recomputed at each call
func (*MGTP4IPv6DstFields) PDUSessionID ¶
func (a *MGTP4IPv6DstFields) PDUSessionID() uint32
func (*MGTP4IPv6DstFields) Prefix ¶
func (e *MGTP4IPv6DstFields) Prefix() netip.Prefix
func (*MGTP4IPv6DstFields) QFI ¶
func (e *MGTP4IPv6DstFields) QFI() uint8
func (*MGTP4IPv6DstFields) R ¶
func (e *MGTP4IPv6DstFields) R() bool
func (*MGTP4IPv6DstFields) U ¶
func (e *MGTP4IPv6DstFields) U() bool
type MGTP4IPv6SrcFields ¶
type MGTP4IPv6SrcFields struct {
// contains filtered or unexported fields
}
func NewMGTP4IPv6SrcFields ¶
func NewMGTP4IPv6SrcFields(addr []byte) (*MGTP4IPv6SrcFields, error)
func (*MGTP4IPv6SrcFields) IPv4 ¶
func (e *MGTP4IPv6SrcFields) IPv4() net.IP
func (*MGTP4IPv6SrcFields) Marshal ¶
func (a *MGTP4IPv6SrcFields) Marshal() ([]byte, error)
Marshal returns the byte sequence generated from MGTP4IPv6SrcFields.
func (*MGTP4IPv6SrcFields) MarshalLen ¶
func (a *MGTP4IPv6SrcFields) MarshalLen() int
func (*MGTP4IPv6SrcFields) MarshalTo ¶
func (a *MGTP4IPv6SrcFields) MarshalTo(b []byte) error
MarshalTo puts the byte sequence in the byte array given as b. warning: no caching is done, this result will be recomputed at each call
func (*MGTP4IPv6SrcFields) UDPPortNumber ¶
func (e *MGTP4IPv6SrcFields) UDPPortNumber() layers.UDPPort