#ifndef _OSPF6_H
#define _OSPF6_H
#ifdef __cplusplus
extern "C" {
#endif
struct lsa6_hdr {
uint16_t ls6_age;
uint16_t ls6_type;
uint32_t ls6_stateid;
uint32_t ls6_router;
uint32_t ls6_seq;
uint16_t ls6_chksum;
uint16_t ls6_length;
};
struct lsa6_prefix {
uint8_t lsa6_plen;
uint8_t lsa6_popt;
uint16_t lsa6_pmbz;
uint8_t lsa6_pfx[4];
};
struct lsa6 {
struct lsa6_hdr ls6_hdr;
union {
struct {
union {
uint8_t rla_flg;
uint32_t rla_opt;
} un_rla_flgopt;
#define rla6_flags un_rla_flgopt.rla_flg
#define rla6_options un_rla_flgopt.rla_opt
struct rla6link {
uint8_t link_type;
uint8_t link_zero[1];
uint16_t link_metric;
uint32_t link_ifid;
uint32_t link_nifid;
uint32_t link_nrtid;
} rla_link[1];
} un_rla;
struct {
uint32_t nla_options;
uint32_t nla_router[1];
} un_nla;
struct {
uint32_t inter_ap_metric;
struct lsa6_prefix inter_ap_prefix[1];
} un_inter_ap;
struct llsa {
union {
uint8_t pri;
uint32_t opt;
} llsa_priandopt;
#define llsa_priority llsa_priandopt.pri
#define llsa_options llsa_priandopt.opt
struct in6_addr llsa_lladdr;
uint32_t llsa_nprefix;
struct lsa6_prefix llsa_prefix[1];
} un_llsa;
struct {
uint16_t intra_ap_nprefix;
uint16_t intra_ap_lstype;
uint32_t intra_ap_lsid;
uint32_t intra_ap_rtid;
struct lsa6_prefix intra_ap_prefix[1];
} un_intra_ap;
} lsa_un;
};
struct ospf6hdr {
uint8_t ospf6_version;
uint8_t ospf6_type;
uint16_t ospf6_len;
uint32_t ospf6_routerid;
uint32_t ospf6_areaid;
uint16_t ospf6_chksum;
uint8_t ospf6_instanceid;
uint8_t ospf6_rsvd;
union {
struct {
uint32_t hello_ifid;
union {
uint8_t pri;
uint32_t opt;
} hello_priandopt;
#define hello6_priority hello_priandopt.pri
#define hello6_options hello_priandopt.opt
uint16_t hello_helloint;
uint16_t hello_deadint;
uint32_t hello_dr;
uint32_t hello_bdr;
uint32_t hello_neighbor[1];
} un_hello;
struct {
uint32_t db_options;
uint16_t db_mtu;
uint8_t db_mbz;
uint8_t db_flags;
uint32_t db_seq;
struct lsa6_hdr db_lshdr[1];
} un_db;
struct lsr6 {
uint16_t ls_mbz;
uint16_t ls_type;
uint32_t ls_stateid;
uint32_t ls_router;
} un_lsr[1];
struct {
uint32_t lsu_count;
struct lsa6 lsu_lsa[1];
} un_lsu;
struct {
struct lsa6_hdr lsa_lshdr[1];
} un_lsa;
} ospf6_un;
};
#define ospf6_hello ospf6_un.un_hello
#define ospf6_db ospf6_un.un_db
#define ospf6_lsr ospf6_un.un_lsr
#define ospf6_lsu ospf6_un.un_lsu
#define ospf6_lsa ospf6_un.un_lsa
#ifdef __cplusplus
}
#endif
#endif