- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000000ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000001ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000002ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000003ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000004ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000005ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000006ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000007ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000008ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c2000009ULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c200000aULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c200000bULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c200000cULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c200000dULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c200000eULL },
- { HMAP_NODE_NULL_INITIALIZER, 0x0108c200000fULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000000ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000001ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000002ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000003ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000004ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000005ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000006ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000007ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000008ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c2000009ULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c200000aULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c200000bULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c200000cULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c200000dULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c200000eULL },
+ { HMAP_NODE_NULL_INITIALIZER, 0x0180c200000fULL },
eth = ofpbuf_put_uninit(b, sizeof *eth);
memcpy(eth->eth_dst, eth_addr_broadcast, ETH_ADDR_LEN);
memcpy(eth->eth_src, eth_src, ETH_ADDR_LEN);
eth = ofpbuf_put_uninit(b, sizeof *eth);
memcpy(eth->eth_dst, eth_addr_broadcast, ETH_ADDR_LEN);
memcpy(eth->eth_src, eth_src, ETH_ADDR_LEN);
+/* Sets the SCTP source and destination port ('src' and 'dst' respectively) of
+ * the SCTP header contained in 'packet'. 'packet' must be a valid SCTP packet
+ * with its l4 marker properly populated. */
+void
+packet_set_sctp_port(struct ofpbuf *packet, ovs_be16 src, ovs_be16 dst)
+{
+ struct sctp_header *sh = packet->l4;
+ ovs_be32 old_csum, old_correct_csum, new_csum;
+ uint16_t tp_len = packet->size - ((uint8_t*)sh - (uint8_t*)packet->data);
+
+ old_csum = sh->sctp_csum;
+ sh->sctp_csum = 0;
+ old_correct_csum = crc32c(packet->l4, tp_len);
+
+ sh->sctp_src = src;
+ sh->sctp_dst = dst;
+
+ new_csum = crc32c(packet->l4, tp_len);
+ sh->sctp_csum = old_csum ^ old_correct_csum ^ new_csum;
+}
+
- if (tcp_flags & 0x40) {
- ds_put_cstr(s, "[40]");
+ if (tcp_flags & TCP_ECE) {
+ ds_put_cstr(s, "E");
+ }
+ if (tcp_flags & TCP_CWR) {
+ ds_put_cstr(s, "C");
+ }
+ if (tcp_flags & TCP_NS) {
+ ds_put_cstr(s, "N");
+ }
+ if (tcp_flags & 0x200) {
+ ds_put_cstr(s, "[200]");
+ }
+ if (tcp_flags & 0x400) {
+ ds_put_cstr(s, "[400]");