parse_protocol(const char *name, const struct protocol **p_out)
{
static const struct protocol protocols[] = {
- { "ip", ETH_TYPE_IP },
- { "arp", ETH_TYPE_ARP },
+ { "ip", ETH_TYPE_IP, 0 },
+ { "arp", ETH_TYPE_ARP, 0 },
{ "icmp", ETH_TYPE_IP, IP_TYPE_ICMP },
{ "tcp", ETH_TYPE_IP, IP_TYPE_TCP },
{ "udp", ETH_TYPE_IP, IP_TYPE_UDP },
{
#define F_OFS(MEMBER) offsetof(struct ofp_match, MEMBER)
static const struct field fields[] = {
- { "in_port", OFPFW_IN_PORT, F_U16, F_OFS(in_port) },
- { "dl_vlan", OFPFW_DL_VLAN, F_U16, F_OFS(dl_vlan) },
- { "dl_src", OFPFW_DL_SRC, F_MAC, F_OFS(dl_src) },
- { "dl_dst", OFPFW_DL_DST, F_MAC, F_OFS(dl_dst) },
- { "dl_type", OFPFW_DL_TYPE, F_U16, F_OFS(dl_type) },
+ { "in_port", OFPFW_IN_PORT, F_U16, F_OFS(in_port), 0 },
+ { "dl_vlan", OFPFW_DL_VLAN, F_U16, F_OFS(dl_vlan), 0 },
+ { "dl_src", OFPFW_DL_SRC, F_MAC, F_OFS(dl_src), 0 },
+ { "dl_dst", OFPFW_DL_DST, F_MAC, F_OFS(dl_dst), 0 },
+ { "dl_type", OFPFW_DL_TYPE, F_U16, F_OFS(dl_type), 0 },
{ "nw_src", OFPFW_NW_SRC_MASK, F_IP,
F_OFS(nw_src), OFPFW_NW_SRC_SHIFT },
{ "nw_dst", OFPFW_NW_DST_MASK, F_IP,
F_OFS(nw_dst), OFPFW_NW_DST_SHIFT },
- { "nw_proto", OFPFW_NW_PROTO, F_U8, F_OFS(nw_proto) },
- { "tp_src", OFPFW_TP_SRC, F_U16, F_OFS(tp_src) },
- { "tp_dst", OFPFW_TP_DST, F_U16, F_OFS(tp_dst) },
- { "icmp_type", OFPFW_ICMP_TYPE, F_U16, F_OFS(icmp_type) },
- { "icmp_code", OFPFW_ICMP_CODE, F_U16, F_OFS(icmp_code) }
+ { "nw_proto", OFPFW_NW_PROTO, F_U8, F_OFS(nw_proto), 0 },
+ { "tp_src", OFPFW_TP_SRC, F_U16, F_OFS(tp_src), 0 },
+ { "tp_dst", OFPFW_TP_DST, F_U16, F_OFS(tp_dst), 0 },
+ { "icmp_type", OFPFW_ICMP_TYPE, F_U16, F_OFS(icmp_type), 0 },
+ { "icmp_code", OFPFW_ICMP_CODE, F_U16, F_OFS(icmp_code), 0 }
};
const struct field *f;