git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debian: Add sFlow license information and text to copyright.in.
[sliver-openvswitch.git]
/
lib
/
packets.h
diff --git
a/lib/packets.h
b/lib/packets.h
index
e727cc9
..
439a7dd
100644
(file)
--- a/
lib/packets.h
+++ b/
lib/packets.h
@@
-38,7
+38,7
@@
static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] OVS_UNUSED
= { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
static const uint8_t eth_addr_stp[ETH_ADDR_LEN] OVS_UNUSED
= { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
static const uint8_t eth_addr_stp[ETH_ADDR_LEN] OVS_UNUSED
- = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x0
1
};
+ = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x0
0
};
static const uint8_t eth_addr_lacp[ETH_ADDR_LEN] OVS_UNUSED
= { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 };
static const uint8_t eth_addr_lacp[ETH_ADDR_LEN] OVS_UNUSED
= { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 };
@@
-132,6
+132,7
@@
void compose_benign_packet(struct ofpbuf *, const char *tag,
const uint8_t eth_src[ETH_ADDR_LEN]);
void eth_push_vlan(struct ofpbuf *, ovs_be16 tci);
const uint8_t eth_src[ETH_ADDR_LEN]);
void eth_push_vlan(struct ofpbuf *, ovs_be16 tci);
+void eth_pop_vlan(struct ofpbuf *);
/* Example:
*
/* Example:
*
@@
-291,6
+292,11
@@
ip_is_cidr(ovs_be32 netmask)
uint32_t x = ~ntohl(netmask);
return !(x & (x + 1));
}
uint32_t x = ~ntohl(netmask);
return !(x & (x + 1));
}
+static inline bool
+ip_is_multicast(ovs_be32 ip)
+{
+ return (ip & htonl(0xf0000000)) == htonl(0xe0000000);
+}
int ip_count_cidr_bits(ovs_be32 netmask);
void ip_format_masked(ovs_be32 ip, ovs_be32 mask, struct ds *);
int ip_count_cidr_bits(ovs_be32 netmask);
void ip_format_masked(ovs_be32 ip, ovs_be32 mask, struct ds *);
@@
-387,6
+393,9
@@
struct arp_eth_header {
} __attribute__((packed));
BUILD_ASSERT_DECL(ARP_ETH_HEADER_LEN == sizeof(struct arp_eth_header));
} __attribute__((packed));
BUILD_ASSERT_DECL(ARP_ETH_HEADER_LEN == sizeof(struct arp_eth_header));
+/* The IPv6 flow label is in the lower 20 bits of the first 32-bit word. */
+#define IPV6_LABEL_MASK 0x000fffff
+
/* Example:
*
* char *string = "1 ::1 2";
/* Example:
*
* char *string = "1 ::1 2";