mbgtools-lx  4.2.8
Basic network parameter types

Data Structures

struct  MBG_MAC_ADDR
 The MAC address of a network interface. More...
 
struct  IP6_ADDR
 An IPv6 address. More...
 
struct  IP6_ADDR_CIDR
 An IPv6 address plus number of netmask bits. More...
 

Macros

#define _mbg_swab_mbg_mac_addr(_p)   _nop_macro_fnc()
 
#define _mbg_swab_ip4_addr(_p)   _mbg_swab32( _p )
 
#define IP6_ADDR_BITS   128
 The number of bits used for an IPv6 address. More...
 
#define IP6_ADDR_BYTES   ( IP6_ADDR_BITS / 8 )
 The number of bytes used for an IPv6 address. More...
 
#define _mbg_swab_ip6_addr(_p)   _nop_macro_fnc()
 
#define MAX_IP6_ADDR_STR_LEN   43
 The max number of chars required for an IPv6 address string. More...
 
#define IP6_ADDR_STR_SIZE   ( MAX_IP6_ADDR_STR_LEN + 1 )
 Buffer size required to store an IPv6 address string. More...
 
#define IPV6_MULTICAST_SCOPE_NAME_TABLE_ENTRIES
 Name strings for IPv6 multicast scopes. More...
 
#define MBG_MAX_HOSTNAME_LEN   256
 The maximum length of a fully qualified host/domain domain name (FQDN) More...
 
#define _mbg_swab_mbg_host_name(_p)   _nop_macro_fnc()
 

Typedefs

typedef uint32_t IP4_ADDR
 An IPv4 address. More...
 
typedef char IP6_ADDR_STR[(43+1)]
 A buffer for an IPv6 address string. More...
 
typedef char MBG_HOSTNAME[256]
 A buffer for a fully qualified domain name (FQDN) or a numeric IP address string. More...
 

Enumerations

enum  IPV6_MULTICAST_SCOPES {
  IPV6_MULTICAST_SCOPE_INTF_LOCAL = 0x01, IPV6_MULTICAST_SCOPE_LINK_LOCAL, IPV6_MULTICAST_SCOPE_REALM_LOCAL, IPV6_MULTICAST_SCOPE_ADMIN_LOCAL,
  IPV6_MULTICAST_SCOPE_SITE_LOCAL, IPV6_MULTICAST_SCOPE_ORGA_LOCAL = 0x08, IPV6_MULTICAST_SCOPE_GLOBAL_SCOPE = 0x0E
}
 Possible IPv6 Multicast Scopes. More...
 

Detailed Description

Macro Definition Documentation

◆ _mbg_swab_ip4_addr

#define _mbg_swab_ip4_addr (   _p)    _mbg_swab32( _p )

Definition at line 11047 of file gpsdefs.h.

◆ _mbg_swab_ip6_addr

#define _mbg_swab_ip6_addr (   _p)    _nop_macro_fnc()

Definition at line 11067 of file gpsdefs.h.

◆ _mbg_swab_mbg_host_name

#define _mbg_swab_mbg_host_name (   _p)    _nop_macro_fnc()

Definition at line 11154 of file gpsdefs.h.

◆ _mbg_swab_mbg_mac_addr

#define _mbg_swab_mbg_mac_addr (   _p)    _nop_macro_fnc()

Definition at line 11037 of file gpsdefs.h.

◆ IP6_ADDR_BITS

#define IP6_ADDR_BITS   128

The number of bits used for an IPv6 address.

Definition at line 11053 of file gpsdefs.h.

Referenced by ip6_net_mask_from_cidr().

◆ IP6_ADDR_BYTES

#define IP6_ADDR_BYTES   ( IP6_ADDR_BITS / 8 )

The number of bytes used for an IPv6 address.

Definition at line 11056 of file gpsdefs.h.

Referenced by get_ip6_net_mask_bits(), ip6_net_mask_from_cidr(), ip6_net_part_from_addr(), and snprint_ip6_addr().

◆ IP6_ADDR_STR_SIZE

#define IP6_ADDR_STR_SIZE   ( MAX_IP6_ADDR_STR_LEN + 1 )

Buffer size required to store an IPv6 address string.

MAX_IP6_ADDR_STR_LEN + terminating 0

Definition at line 11088 of file gpsdefs.h.

◆ IPV6_MULTICAST_SCOPE_NAME_TABLE_ENTRIES

#define IPV6_MULTICAST_SCOPE_NAME_TABLE_ENTRIES
Value:
{ \
{ IPV6_MULTICAST_SCOPE_INTF_LOCAL, "FF01 - Interface-Local Scope" }, \
{ IPV6_MULTICAST_SCOPE_LINK_LOCAL, "FF02 - Link-Local Scope" }, \
{ IPV6_MULTICAST_SCOPE_REALM_LOCAL, "FF03 - Realm-Local Scope" }, \
{ IPV6_MULTICAST_SCOPE_ADMIN_LOCAL, "FF04 - Admin-Local Scope" }, \
{ IPV6_MULTICAST_SCOPE_SITE_LOCAL, "FF05 - Site-Local Scope" }, \
{ IPV6_MULTICAST_SCOPE_ORGA_LOCAL, "FF08 - Organization-Local Scope" }, \
{ IPV6_MULTICAST_SCOPE_GLOBAL_SCOPE, "FF0E - Global Scope" }, \
{ 0, NULL } \
}
Interface-Local scope.
Definition: gpsdefs.h:11108
Organization-Local scope.
Definition: gpsdefs.h:11113

Name strings for IPv6 multicast scopes.

This can e.g. be used to initialize an array of MBG_CODE_NAME_TABLE_ENTRY elements.

See also
IPV6_MULTICAST_SCOPES

Definition at line 11125 of file gpsdefs.h.

◆ MAX_IP6_ADDR_STR_LEN

#define MAX_IP6_ADDR_STR_LEN   43

The max number of chars required for an IPv6 address string.

e.g. 2001:0db8:85a3:08d3:1319:8a2e:0370:7344/128

Definition at line 11085 of file gpsdefs.h.

◆ MBG_MAX_HOSTNAME_LEN

#define MBG_MAX_HOSTNAME_LEN   256

The maximum length of a fully qualified host/domain domain name (FQDN)

In theory each single component (host name, domain name, top level domain name) of a FQDN can have up to 63 characters, but the overall length is limited to 255 characters (see RFC-1123). We specify one more character for the trailing 0.

Definition at line 11146 of file gpsdefs.h.

Typedef Documentation

◆ IP4_ADDR

typedef uint32_t IP4_ADDR

An IPv4 address.

Definition at line 11045 of file gpsdefs.h.

◆ IP6_ADDR_STR

typedef char IP6_ADDR_STR[( 43+1)]

A buffer for an IPv6 address string.

Definition at line 11091 of file gpsdefs.h.

◆ MBG_HOSTNAME

typedef char MBG_HOSTNAME[256]

A buffer for a fully qualified domain name (FQDN) or a numeric IP address string.

ASCIIZ format

Definition at line 11152 of file gpsdefs.h.

Enumeration Type Documentation

◆ IPV6_MULTICAST_SCOPES

Possible IPv6 Multicast Scopes.

If the first (most significant) byte of an IPv6 address is 0xFF this indicates that the address is a multicast address, and in this case the second byte determines the scope for which the specified address is valid. These scope ID numbers are assigned in RFC 7346 which supersedes RFC 4291.

See also
IPV6_MULTICAST_SCOPE_NAME_TABLE_ENTRIES
Enumerator
IPV6_MULTICAST_SCOPE_INTF_LOCAL 

Interface-Local scope.

IPV6_MULTICAST_SCOPE_LINK_LOCAL 

Link-Local scope.

IPV6_MULTICAST_SCOPE_REALM_LOCAL 

Realm-Local scope.

IPV6_MULTICAST_SCOPE_ADMIN_LOCAL 

Admin-Local scope.

IPV6_MULTICAST_SCOPE_SITE_LOCAL 

Site-Local scope.

IPV6_MULTICAST_SCOPE_ORGA_LOCAL 

Organization-Local scope.

IPV6_MULTICAST_SCOPE_GLOBAL_SCOPE 

Global scope.

Definition at line 11106 of file gpsdefs.h.