/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2013-2014 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
+import org.opendaylight.controller.sal.match.Match;
+import org.opendaylight.controller.sal.match.MatchType;
import org.opendaylight.controller.sal.utils.IPProtocols;
import org.opendaylight.controller.sal.utils.NetUtils;
import org.slf4j.Logger;
}
/**
- * Stores the length of IP header in words (2 bytes)
+ * Stores the length of IP header in words (4 bytes)
* @param headerLength the headerLength to set
* @return IPv4
*/
corrupted = true;
}
}
+
+ @Override
+ public void populateMatch(Match match) {
+ match.setField(MatchType.NW_SRC, NetUtils.getInetAddress(this.getSourceAddress()));
+ match.setField(MatchType.NW_DST, NetUtils.getInetAddress(this.getDestinationAddress()));
+ match.setField(MatchType.NW_PROTO, this.getProtocol());
+ match.setField(MatchType.NW_TOS, this.getDiffServ());
+ }
}