9 /* Identification data for a flow.
10 All fields are in network byte order.
11 In decreasing order by size, so that flow structures can be hashed or
14 uint32_t nw_src; /* IP source address. */
15 uint32_t nw_dst; /* IP destination address. */
16 uint16_t in_port; /* Input switch port. */
17 uint16_t dl_vlan; /* Input VLAN. */
18 uint16_t dl_type; /* Ethernet frame type. */
19 uint16_t tp_src; /* TCP/UDP source port. */
20 uint16_t tp_dst; /* TCP/UDP destination port. */
21 uint8_t dl_src[6]; /* Ethernet source address. */
22 uint8_t dl_dst[6]; /* Ethernet destination address. */
23 uint8_t nw_proto; /* IP protocol. */
24 uint8_t reserved; /* One byte of padding. */
26 BUILD_ASSERT_DECL(sizeof (struct flow) == 32);
28 void flow_extract(struct buffer *, uint16_t in_port, struct flow *);
29 void flow_print(FILE *, const struct flow *);
30 int flow_compare(const struct flow *, const struct flow *);
31 unsigned long int flow_hash(const struct flow *, uint32_t basis);