/* This maximum ha length copied from the definition of struct neighbour */ #define VIA_ALEN_ALIGN sizeof(unsignedlong) #define MAX_VIA_ALEN (ALIGN(MAX_ADDR_LEN, VIA_ALEN_ALIGN))
/* Other types not implemented: * - Pseudo-wire with or without control word (RFC4385) * - GAL (RFC5586)
*/
};
struct mpls_nh { /* next hop label forwarding entry */ struct net_device *nh_dev;
/* nh_flags is accessed under RCU in the packet path; it is * modified handling netdev events with rtnl lock held
*/ unsignedint nh_flags;
u8 nh_labels;
u8 nh_via_alen;
u8 nh_via_table;
u8 nh_reserved1;
u32 nh_label[];
};
/* offset of via from beginning of mpls_nh */ #define MPLS_NH_VIA_OFF(num_labels) \
ALIGN(sizeof(struct mpls_nh) + (num_labels) * sizeof(u32), \
VIA_ALEN_ALIGN)
/* all nexthops within a route have the same size based on the * max number of labels and max via length across all nexthops
*/ #define MPLS_NH_SIZE(num_labels, max_via_alen) \
(MPLS_NH_VIA_OFF((num_labels)) + \
ALIGN((max_via_alen), VIA_ALEN_ALIGN))
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.