Next: , Up: Rtnetlink API   [Contents][Index]


2.3.1 Routing Attributes

The (netlink route attrs) module defines the following data types:

Datatype: route-attr

This defines a header structure for the attribute, as well as its body.

type

This is the type of the attribute, for instance IFLA_ADDRESS.

data

This is the body of the attribute, ie. its value.

The module also defines additional data types that are not represented as a record, but by a simple type. For each of the following types, there is a make-*-route-attr procedure to produce a nl-data value for this type. There is also deserialize-route-attr-data-* procedure to deserialize a value of this type.

u8

A one-byte unsigned integer

u16

A two-bytes unsigned integer

u32

A four-bytes unsigned integer

s32

A four-bytes signed integer

string

A string

ethernet

An ethernet address. Its value is a string that represents that address, for instnace "01:23:45:67:89:ab"

ipv4

An IPv4 address. Its value is a string that represents that address, for instnace "192.0.2.152"

ipv6

An IPv6 address. Its value is a string that represents that address, for instnace "2001:db8::0123:4567:89ab:cdef"

bv

A bytevector. This is used by default when the type is not supported.