* 0 if successful
* -1 and sets rte_errno if invalid string
*/
-__rte_experimental
int
rte_ether_unformat_addr(const char *str, struct rte_ether_addr *eth_addr);
-/* Windows Sockets headers contain `#define s_addr S_un.S_addr`.
- * Temporarily disable this macro to avoid conflict at definition.
- * Place source MAC address in both `s_addr` and `S_un.S_addr` fields,
- * so that access works either directly or through the macro.
- */
-#pragma push_macro("s_addr")
-#ifdef s_addr
-#undef s_addr
-#endif
-
/**
* Ethernet header: Contains the destination address, source address
* and frame type.
*/
struct rte_ether_hdr {
- struct rte_ether_addr d_addr; /**< Destination address. */
- RTE_STD_C11
- union {
- struct rte_ether_addr s_addr; /**< Source address. */
- struct {
- struct rte_ether_addr S_addr;
- } S_un; /**< Do not use directly; use s_addr instead.*/
- };
+ struct rte_ether_addr dst_addr; /**< Destination address. */
+ struct rte_ether_addr src_addr; /**< Source address. */
rte_be16_t ether_type; /**< Frame type. */
} __rte_aligned(2);
-#pragma pop_macro("s_addr")
-
/**
* Ethernet VLAN Header.
* Contains the 16-bit VLAN Tag Control Identifier and the Ethernet type
return -1;
vh = (struct rte_vlan_hdr *)(eh + 1);
- m->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
+ m->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
m->vlan_tci = rte_be_to_cpu_16(vh->vlan_tci);
/* Copy ether header over rather than moving whole packet */
vh = (struct rte_vlan_hdr *) (nh + 1);
vh->vlan_tci = rte_cpu_to_be_16((*m)->vlan_tci);
- (*m)->ol_flags &= ~(PKT_RX_VLAN_STRIPPED | PKT_TX_VLAN);
+ (*m)->ol_flags &= ~(RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_TX_VLAN);
- if ((*m)->ol_flags & PKT_TX_TUNNEL_MASK)
+ if ((*m)->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
(*m)->outer_l2_len += sizeof(struct rte_vlan_hdr);
else
(*m)->l2_len += sizeof(struct rte_vlan_hdr);