diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-12-15 17:58:23 -0800 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2012-01-10 14:30:15 -0800 |
commit | c97664b30f65d3a087076cb33242ffe2cc52a814 (patch) | |
tree | 6037a862dc1e52c850ec03a91c0dd2f4d18689b2 /lib/packets.h | |
parent | 65120a8a4ec658f4318ca3ac6159e27f584bca8e (diff) |
packets: New packet_set_*() helper functions.
This commit pulls code used to modify L3 and L4 header fields
from dp_netdev into the packet library. An additional user will
be added in a future commit.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/packets.h')
-rw-r--r-- | lib/packets.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/packets.h b/lib/packets.h index 16834a8b..78ccfe90 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -463,5 +463,9 @@ void *eth_compose(struct ofpbuf *, const uint8_t eth_dst[ETH_ADDR_LEN], void *snap_compose(struct ofpbuf *, const uint8_t eth_dst[ETH_ADDR_LEN], const uint8_t eth_src[ETH_ADDR_LEN], unsigned int oui, uint16_t snap_type, size_t size); +void packet_set_ipv4(struct ofpbuf *, ovs_be32 src, ovs_be32 dst, uint8_t tos, + uint8_t ttl); +void packet_set_tcp_port(struct ofpbuf *, ovs_be16 src, ovs_be16 dst); +void packet_set_udp_port(struct ofpbuf *, ovs_be16 src, ovs_be16 dst); #endif /* packets.h */ |