Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG-2218: Keep existing link augmentations during discovery process
[controller.git]
/
opendaylight
/
sal
/
api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
packet
/
UDP.java
diff --git
a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/UDP.java
b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/UDP.java
index fba3f5c917ffc3b625c33c261c7e78b4a0245d01..069a277f89d9ee44df2e4ca22d9783fb9b9a6404 100644
(file)
--- a/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/UDP.java
+++ b/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/UDP.java
@@
-1,6
+1,6
@@
/*
/*
- * 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,
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@
-15,6
+15,8
@@
import java.util.Map;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
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;
/**
* Class that represents the UDP datagram objects
/**
* Class that represents the UDP datagram objects
@@
-109,9
+111,6
@@
public class UDP extends Packet {
* Store the value read from data stream in hdrFieldMap
*/
public void setHeaderField(String headerField, byte[] readValue) {
* Store the value read from data stream in hdrFieldMap
*/
public void setHeaderField(String headerField, byte[] readValue) {
- /*if (headerField.equals("Protocol")) {
- payloadClass = decodeMap.get(readValue);
- }*/
hdrFieldsMap.put(headerField, readValue);
}
hdrFieldsMap.put(headerField, readValue);
}
@@
-159,4
+158,10
@@
public class UDP extends Packet {
fieldValues.put(CHECKSUM, checksum);
return this;
}
fieldValues.put(CHECKSUM, checksum);
return this;
}
+
+ @Override
+ public void populateMatch(Match match) {
+ match.setField(MatchType.TP_SRC, this.getSourcePort());
+ match.setField(MatchType.TP_DST, this.getDestinationPort());
+ }
}
}