How to recv IPv6 DSTOPTS extension header with IPv6 Option over TCP socket
Issue
This article describes the server side of using IPv6 Extension headers over TCP socket.
The client side is described in article 714913:
How to send IPv6 DSTOPTS extension header with IPv6 Option over TCP socket?
A tcp server wants to get ancillary data attached to incoming packet on IPv6 TCP socket.
The header type should be "Destination options header" IPPROTO_DSTOPTS.
The header should contain one "IPv6 Option" with specific self defined option type and data.
The option, which server wants to get, should carry the structure of a type "dst_opt_tlv_t" defined below:
typedef struct {
uint16_t port;
uint16_t vrf;
uint8_t flags;
uint8_t reserved[3];
uint8_t addr8[16];
} dst_opt_tlv_data_t;
typedef struct {
uint8_t padn;
uint8_t len;
uint8_t data[8];
} dst_opt_tlv_pad_t;
typedef struct {
dst_opt_tlv_data_t data;
dst_opt_tlv_pad_t pad;
} dst_opt_tlv_t;
Environment
Red Hat Enterprise Linux (RHEL) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
