func handleEthernetFlowKeyOptions(flow odp.FlowSpec, src string, dst string) error { var err error takeErr := func(key [ETH_ALEN]byte, mask [ETH_ALEN]byte, e error) ([ETH_ALEN]byte, [ETH_ALEN]byte) { err = e return key, mask } fk := odp.NewEthernetFlowKey() fk.SetMaskedEthSrc(takeErr(handleEthernetAddrOption(src))) fk.SetMaskedEthDst(takeErr(handleEthernetAddrOption(dst))) if err != nil { return err } flow.AddKey(fk) return nil }
func (fop odpFlowKeyFlowOp) updateFlowSpec(flow *odp.FlowSpec) { flow.AddKey(fop.key) }
func (fop odpActionsFlowOp) updateFlowSpec(flow *odp.FlowSpec) { flow.AddActions(fop.actions) }