tom

Fixed javadoc warnings in slew of legacy code. We need to keep up on this; the o…

…ld stuff is pretty sloppy.
...@@ -632,7 +632,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -632,7 +632,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
632 * @param m The OFMessage that has just been received 632 * @param m The OFMessage that has just been received
633 * @param details A string giving more details about the exact nature 633 * @param details A string giving more details about the exact nature
634 * of the problem. 634 * of the problem.
635 - * @return 635 + * @return display string
636 */ 636 */
637 // needs to be protected because enum members are actually subclasses 637 // needs to be protected because enum members are actually subclasses
638 protected String getSwitchStateMessage(OFChannelHandler h, 638 protected String getSwitchStateMessage(OFChannelHandler h,
...@@ -682,7 +682,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -682,7 +682,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
682 682
683 /** 683 /**
684 * Log an OpenFlow error message from a switch. 684 * Log an OpenFlow error message from a switch.
685 - * @param sw The switch that sent the error 685 + * @param h The switch that sent the error
686 * @param error The error message 686 * @param error The error message
687 */ 687 */
688 @LogMessageDoc(level = "ERROR", 688 @LogMessageDoc(level = "ERROR",
...@@ -1185,7 +1185,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -1185,7 +1185,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
1185 /** 1185 /**
1186 * Return a string describing this switch based on the already available 1186 * Return a string describing this switch based on the already available
1187 * information (DPID and/or remote socket). 1187 * information (DPID and/or remote socket).
1188 - * @return 1188 + * @return display string
1189 */ 1189 */
1190 private String getSwitchInfoString() { 1190 private String getSwitchInfoString() {
1191 if (sw != null) { 1191 if (sw != null) {
......
...@@ -69,7 +69,6 @@ class RoleManager implements RoleHandler { ...@@ -69,7 +69,6 @@ class RoleManager implements RoleHandler {
69 * Send NX role request message to the switch requesting the specified 69 * Send NX role request message to the switch requesting the specified
70 * role. 70 * role.
71 * 71 *
72 - * @param sw switch to send the role request message to
73 * @param role role to request 72 * @param role role to request
74 */ 73 */
75 private int sendNxRoleRequest(RoleState role) throws IOException { 74 private int sendNxRoleRequest(RoleState role) throws IOException {
...@@ -318,8 +317,7 @@ class RoleManager implements RoleHandler { ...@@ -318,8 +317,7 @@ class RoleManager implements RoleHandler {
318 * Extract the role from an OFVendor message if the message is a 317 * Extract the role from an OFVendor message if the message is a
319 * Nicira role reply. Otherwise return null. 318 * Nicira role reply. Otherwise return null.
320 * 319 *
321 - * @param h The channel handler receiving the message 320 + * @param experimenterMsg message
322 - * @param vendorMessage The vendor message to parse.
323 * @return The role in the message if the message is a Nicira role 321 * @return The role in the message if the message is a Nicira role
324 * reply, null otherwise. 322 * reply, null otherwise.
325 * @throws SwitchStateException If the message is a Nicira role reply 323 * @throws SwitchStateException If the message is a Nicira role reply
...@@ -363,7 +361,7 @@ class RoleManager implements RoleHandler { ...@@ -363,7 +361,7 @@ class RoleManager implements RoleHandler {
363 361
364 /** 362 /**
365 * Extract the role information from an OF1.3 Role Reply Message. 363 * Extract the role information from an OF1.3 Role Reply Message.
366 - * @param h 364 + *
367 * @param rrmsg the role message 365 * @param rrmsg the role message
368 * @return RoleReplyInfo object 366 * @return RoleReplyInfo object
369 * @throws SwitchStateException if the role information could not be extracted. 367 * @throws SwitchStateException if the role information could not be extracted.
......
...@@ -22,4 +22,3 @@ ...@@ -22,4 +22,3 @@
22 <suppress files=".java" checks="NewlineAtEndOfFile"/> 22 <suppress files=".java" checks="NewlineAtEndOfFile"/>
23 23
24 </suppressions> 24 </suppressions>
25 -
......
...@@ -67,7 +67,7 @@ public class ARP extends BasePacket { ...@@ -67,7 +67,7 @@ public class ARP extends BasePacket {
67 } 67 }
68 68
69 /** 69 /**
70 - * @param hardwareType 70 + * @param hwType
71 * the hardwareType to set 71 * the hardwareType to set
72 */ 72 */
73 public ARP setHardwareType(final short hwType) { 73 public ARP setHardwareType(final short hwType) {
...@@ -83,7 +83,7 @@ public class ARP extends BasePacket { ...@@ -83,7 +83,7 @@ public class ARP extends BasePacket {
83 } 83 }
84 84
85 /** 85 /**
86 - * @param protocolType 86 + * @param protoType
87 * the protocolType to set 87 * the protocolType to set
88 */ 88 */
89 public ARP setProtocolType(final short protoType) { 89 public ARP setProtocolType(final short protoType) {
...@@ -115,7 +115,7 @@ public class ARP extends BasePacket { ...@@ -115,7 +115,7 @@ public class ARP extends BasePacket {
115 } 115 }
116 116
117 /** 117 /**
118 - * @param protocolAddressLength 118 + * @param protoAddressLength
119 * the protocolAddressLength to set 119 * the protocolAddressLength to set
120 */ 120 */
121 public ARP setProtocolAddressLength(final byte protoAddressLength) { 121 public ARP setProtocolAddressLength(final byte protoAddressLength) {
...@@ -131,7 +131,7 @@ public class ARP extends BasePacket { ...@@ -131,7 +131,7 @@ public class ARP extends BasePacket {
131 } 131 }
132 132
133 /** 133 /**
134 - * @param opCode 134 + * @param op
135 * the opCode to set 135 * the opCode to set
136 */ 136 */
137 public ARP setOpCode(final short op) { 137 public ARP setOpCode(final short op) {
...@@ -147,7 +147,7 @@ public class ARP extends BasePacket { ...@@ -147,7 +147,7 @@ public class ARP extends BasePacket {
147 } 147 }
148 148
149 /** 149 /**
150 - * @param senderHardwareAddress 150 + * @param senderHWAddress
151 * the senderHardwareAddress to set 151 * the senderHardwareAddress to set
152 */ 152 */
153 public ARP setSenderHardwareAddress(final byte[] senderHWAddress) { 153 public ARP setSenderHardwareAddress(final byte[] senderHWAddress) {
...@@ -163,7 +163,7 @@ public class ARP extends BasePacket { ...@@ -163,7 +163,7 @@ public class ARP extends BasePacket {
163 } 163 }
164 164
165 /** 165 /**
166 - * @param senderProtocolAddress 166 + * @param senderProtoAddress
167 * the senderProtocolAddress to set 167 * the senderProtocolAddress to set
168 */ 168 */
169 public ARP setSenderProtocolAddress(final byte[] senderProtoAddress) { 169 public ARP setSenderProtocolAddress(final byte[] senderProtoAddress) {
...@@ -185,7 +185,7 @@ public class ARP extends BasePacket { ...@@ -185,7 +185,7 @@ public class ARP extends BasePacket {
185 } 185 }
186 186
187 /** 187 /**
188 - * @param targetHardwareAddress 188 + * @param targetHWAddress
189 * the targetHardwareAddress to set 189 * the targetHardwareAddress to set
190 */ 190 */
191 public ARP setTargetHardwareAddress(final byte[] targetHWAddress) { 191 public ARP setTargetHardwareAddress(final byte[] targetHWAddress) {
...@@ -218,7 +218,7 @@ public class ARP extends BasePacket { ...@@ -218,7 +218,7 @@ public class ARP extends BasePacket {
218 } 218 }
219 219
220 /** 220 /**
221 - * @param targetProtocolAddress 221 + * @param targetProtoAddress
222 * the targetProtocolAddress to set 222 * the targetProtocolAddress to set
223 */ 223 */
224 public ARP setTargetProtocolAddress(final byte[] targetProtoAddress) { 224 public ARP setTargetProtocolAddress(final byte[] targetProtoAddress) {
......
...@@ -294,7 +294,7 @@ public class DHCP extends BasePacket { ...@@ -294,7 +294,7 @@ public class DHCP extends BasePacket {
294 /** 294 /**
295 * Gets a specific DHCP option parameter. 295 * Gets a specific DHCP option parameter.
296 * 296 *
297 - * @param opetionCode 297 + * @param optionCode
298 * The option code to get 298 * The option code to get
299 * @return The value of the option if it exists, null otherwise 299 * @return The value of the option if it exists, null otherwise
300 */ 300 */
......
...@@ -96,7 +96,7 @@ public class Ethernet extends BasePacket { ...@@ -96,7 +96,7 @@ public class Ethernet extends BasePacket {
96 /** 96 /**
97 * Sets the destination MAC address. 97 * Sets the destination MAC address.
98 * 98 *
99 - * @param destinationMACAddress the destination MAC to set 99 + * @param destMac the destination MAC to set
100 * @return the Ethernet frame 100 * @return the Ethernet frame
101 */ 101 */
102 public Ethernet setDestinationMACAddress(final byte[] destMac) { 102 public Ethernet setDestinationMACAddress(final byte[] destMac) {
...@@ -107,7 +107,7 @@ public class Ethernet extends BasePacket { ...@@ -107,7 +107,7 @@ public class Ethernet extends BasePacket {
107 /** 107 /**
108 * Sets the destination MAC address. 108 * Sets the destination MAC address.
109 * 109 *
110 - * @param destinationMACAddress the destination MAC to set 110 + * @param destMac the destination MAC to set
111 * @return the Ethernet frame 111 * @return the Ethernet frame
112 */ 112 */
113 public Ethernet setDestinationMACAddress(final String destMac) { 113 public Ethernet setDestinationMACAddress(final String destMac) {
...@@ -136,7 +136,7 @@ public class Ethernet extends BasePacket { ...@@ -136,7 +136,7 @@ public class Ethernet extends BasePacket {
136 /** 136 /**
137 * Sets the source MAC address. 137 * Sets the source MAC address.
138 * 138 *
139 - * @param sourceMACAddress the source MAC to set 139 + * @param sourceMac the source MAC to set
140 * @return the Ethernet frame 140 * @return the Ethernet frame
141 */ 141 */
142 public Ethernet setSourceMACAddress(final byte[] sourceMac) { 142 public Ethernet setSourceMACAddress(final byte[] sourceMac) {
...@@ -147,7 +147,7 @@ public class Ethernet extends BasePacket { ...@@ -147,7 +147,7 @@ public class Ethernet extends BasePacket {
147 /** 147 /**
148 * Sets the source MAC address. 148 * Sets the source MAC address.
149 * 149 *
150 - * @param sourceMACAddress the source MAC to set 150 + * @param sourceMac the source MAC to set
151 * @return the Ethernet frame 151 * @return the Ethernet frame
152 */ 152 */
153 public Ethernet setSourceMACAddress(final String sourceMac) { 153 public Ethernet setSourceMACAddress(final String sourceMac) {
...@@ -167,7 +167,7 @@ public class Ethernet extends BasePacket { ...@@ -167,7 +167,7 @@ public class Ethernet extends BasePacket {
167 /** 167 /**
168 * Sets the priority code. 168 * Sets the priority code.
169 * 169 *
170 - * @param priorityCode the priorityCode to set 170 + * @param priority the priorityCode to set
171 * @return the Ethernet frame 171 * @return the Ethernet frame
172 */ 172 */
173 public Ethernet setPriorityCode(final byte priority) { 173 public Ethernet setPriorityCode(final byte priority) {
...@@ -187,7 +187,7 @@ public class Ethernet extends BasePacket { ...@@ -187,7 +187,7 @@ public class Ethernet extends BasePacket {
187 /** 187 /**
188 * Sets the VLAN ID. 188 * Sets the VLAN ID.
189 * 189 *
190 - * @param vlanID the vlanID to set 190 + * @param vlan the vlanID to set
191 * @return the Ethernet frame 191 * @return the Ethernet frame
192 */ 192 */
193 public Ethernet setVlanID(final short vlan) { 193 public Ethernet setVlanID(final short vlan) {
...@@ -207,7 +207,7 @@ public class Ethernet extends BasePacket { ...@@ -207,7 +207,7 @@ public class Ethernet extends BasePacket {
207 /** 207 /**
208 * Sets the Ethernet type. 208 * Sets the Ethernet type.
209 * 209 *
210 - * @param etherType the etherType to set 210 + * @param ethType the etherType to set
211 * @return the Ethernet frame 211 * @return the Ethernet frame
212 */ 212 */
213 public Ethernet setEtherType(final short ethType) { 213 public Ethernet setEtherType(final short ethType) {
...@@ -242,7 +242,7 @@ public class Ethernet extends BasePacket { ...@@ -242,7 +242,7 @@ public class Ethernet extends BasePacket {
242 /** 242 /**
243 * Pad this packet to 60 bytes minimum, filling with zeros? 243 * Pad this packet to 60 bytes minimum, filling with zeros?
244 * 244 *
245 - * @param pad 245 + * @param pd
246 * the pad to set 246 * the pad to set
247 */ 247 */
248 public Ethernet setPad(final boolean pd) { 248 public Ethernet setPad(final boolean pd) {
...@@ -535,7 +535,7 @@ public class Ethernet extends BasePacket { ...@@ -535,7 +535,7 @@ public class Ethernet extends BasePacket {
535 } else if (pkt instanceof LLC) { 535 } else if (pkt instanceof LLC) {
536 sb.append("\nllc packet"); 536 sb.append("\nllc packet");
537 } else { 537 } else {
538 - sb.append("\nunknwon packet"); 538 + sb.append("\nunknown packet");
539 } 539 }
540 540
541 return sb.toString(); 541 return sb.toString();
......
...@@ -38,27 +38,27 @@ package org.onlab.packet; ...@@ -38,27 +38,27 @@ package org.onlab.packet;
38 public interface IPacket { 38 public interface IPacket {
39 /** 39 /**
40 * 40 *
41 - * @return 41 + * @return the payload
42 */ 42 */
43 public IPacket getPayload(); 43 public IPacket getPayload();
44 44
45 /** 45 /**
46 * 46 *
47 - * @param packet 47 + * @param packet new payload
48 - * @return 48 + * @return self
49 */ 49 */
50 public IPacket setPayload(IPacket packet); 50 public IPacket setPayload(IPacket packet);
51 51
52 /** 52 /**
53 * 53 *
54 - * @return 54 + * @return parent packet
55 */ 55 */
56 public IPacket getParent(); 56 public IPacket getParent();
57 57
58 /** 58 /**
59 * 59 *
60 - * @param packet 60 + * @param packet new parent
61 - * @return 61 + * @return self
62 */ 62 */
63 public IPacket setParent(IPacket packet); 63 public IPacket setParent(IPacket packet);
64 64
...@@ -90,7 +90,7 @@ public interface IPacket { ...@@ -90,7 +90,7 @@ public interface IPacket {
90 /** 90 /**
91 * Clone this packet and its payload packet but not its parent. 91 * Clone this packet and its payload packet but not its parent.
92 * 92 *
93 - * @return 93 + * @return the clone
94 */ 94 */
95 public Object clone(); 95 public Object clone();
96 } 96 }
......
...@@ -422,8 +422,8 @@ public class IPv4 extends BasePacket { ...@@ -422,8 +422,8 @@ public class IPv4 extends BasePacket {
422 * Accepts an IPv4 address of the form xxx.xxx.xxx.xxx, ie 192.168.0.1 and 422 * Accepts an IPv4 address of the form xxx.xxx.xxx.xxx, ie 192.168.0.1 and
423 * returns the corresponding 32 bit integer. 423 * returns the corresponding 32 bit integer.
424 * 424 *
425 - * @param ipAddress 425 + * @param ipAddress ip address in string form
426 - * @return 426 + * @return int ip address value
427 */ 427 */
428 public static int toIPv4Address(final String ipAddress) { 428 public static int toIPv4Address(final String ipAddress) {
429 if (ipAddress == null) { 429 if (ipAddress == null) {
...@@ -447,8 +447,8 @@ public class IPv4 extends BasePacket { ...@@ -447,8 +447,8 @@ public class IPv4 extends BasePacket {
447 * Accepts an IPv4 address in a byte array and returns the corresponding 447 * Accepts an IPv4 address in a byte array and returns the corresponding
448 * 32-bit integer value. 448 * 32-bit integer value.
449 * 449 *
450 - * @param ipAddress 450 + * @param ipAddress ip address in byte form
451 - * @return 451 + * @return int ip address value
452 */ 452 */
453 public static int toIPv4Address(final byte[] ipAddress) { 453 public static int toIPv4Address(final byte[] ipAddress) {
454 int ip = 0; 454 int ip = 0;
...@@ -463,8 +463,8 @@ public class IPv4 extends BasePacket { ...@@ -463,8 +463,8 @@ public class IPv4 extends BasePacket {
463 * Accepts an IPv4 address and returns of string of the form xxx.xxx.xxx.xxx, 463 * Accepts an IPv4 address and returns of string of the form xxx.xxx.xxx.xxx,
464 * e.g., 192.168.0.1. 464 * e.g., 192.168.0.1.
465 * 465 *
466 - * @param ipAddress 466 + * @param ipAddress ip address in form
467 - * @return 467 + * @return string form of ip address
468 */ 468 */
469 public static String fromIPv4Address(final int ipAddress) { 469 public static String fromIPv4Address(final int ipAddress) {
470 final StringBuffer sb = new StringBuffer(); 470 final StringBuffer sb = new StringBuffer();
...@@ -486,7 +486,7 @@ public class IPv4 extends BasePacket { ...@@ -486,7 +486,7 @@ public class IPv4 extends BasePacket {
486 * 486 *
487 * @param ipAddresses 487 * @param ipAddresses
488 * collection 488 * collection
489 - * @return 489 + * @return ip addresses in comma-separated string form
490 */ 490 */
491 public static String fromIPv4AddressCollection( 491 public static String fromIPv4AddressCollection(
492 final Collection<Integer> ipAddresses) { 492 final Collection<Integer> ipAddresses) {
......
...@@ -62,7 +62,7 @@ public class LLDP extends BasePacket { ...@@ -62,7 +62,7 @@ public class LLDP extends BasePacket {
62 } 62 }
63 63
64 /** 64 /**
65 - * @param chassisId 65 + * @param chassis
66 * the chassisId to set 66 * the chassisId to set
67 */ 67 */
68 public LLDP setChassisId(final LLDPTLV chassis) { 68 public LLDP setChassisId(final LLDPTLV chassis) {
......
...@@ -228,7 +228,7 @@ public class ONLabLddp extends LLDP { ...@@ -228,7 +228,7 @@ public class ONLabLddp extends LLDP {
228 /** 228 /**
229 * Sets switch DPID in LLDP packet. 229 * Sets switch DPID in LLDP packet.
230 * 230 *
231 - * @param sw the switch instance 231 + * @param dp the switch instance
232 */ 232 */
233 public void setSwitch(long dp) { 233 public void setSwitch(long dp) {
234 final byte[] dpid = ByteBuffer.allocate(8).putLong(dp) 234 final byte[] dpid = ByteBuffer.allocate(8).putLong(dp)
...@@ -243,8 +243,7 @@ public class ONLabLddp extends LLDP { ...@@ -243,8 +243,7 @@ public class ONLabLddp extends LLDP {
243 * @param port the port instance 243 * @param port the port instance
244 */ 244 */
245 public void setPort(int port) { 245 public void setPort(int port) {
246 - int portNumber = port; 246 + this.setPortTLV(port);
247 - this.setPortTLV(portNumber);
248 } 247 }
249 248
250 /** 249 /**
...@@ -260,7 +259,7 @@ public class ONLabLddp extends LLDP { ...@@ -260,7 +259,7 @@ public class ONLabLddp extends LLDP {
260 * Checks if LLDP packet has correct size, LLDP multicast address, and 259 * Checks if LLDP packet has correct size, LLDP multicast address, and
261 * ethertype. Packet assumed to have Ethernet header. 260 * ethertype. Packet assumed to have Ethernet header.
262 * 261 *
263 - * @param packet 262 + * @param packet packet data
264 * @return true if packet is LLDP, false otherwise 263 * @return true if packet is LLDP, false otherwise
265 */ 264 */
266 public static boolean isLLDP(final byte[] packet) { 265 public static boolean isLLDP(final byte[] packet) {
...@@ -304,8 +303,8 @@ public class ONLabLddp extends LLDP { ...@@ -304,8 +303,8 @@ public class ONLabLddp extends LLDP {
304 * organizationally specific TLVs that use ON.Lab's OUI. Assumes packet is 303 * organizationally specific TLVs that use ON.Lab's OUI. Assumes packet is
305 * valid LLDP packet 304 * valid LLDP packet
306 * 305 *
307 - * @param packet 306 + * @param packet packet data
308 - * @return 307 + * @return eth type or -1
309 */ 308 */
310 public static short isOVXLLDP(byte[] packet) { 309 public static short isOVXLLDP(byte[] packet) {
311 if (packet.length < OVX_LLDP_SIZE) { 310 if (packet.length < OVX_LLDP_SIZE) {
...@@ -340,7 +339,7 @@ public class ONLabLddp extends LLDP { ...@@ -340,7 +339,7 @@ public class ONLabLddp extends LLDP {
340 /** 339 /**
341 * Extracts dpid and port from OVX-generated LLDP packet. 340 * Extracts dpid and port from OVX-generated LLDP packet.
342 * 341 *
343 - * @param packet 342 + * @param packet packet data
344 * @return Dpid and port 343 * @return Dpid and port
345 */ 344 */
346 public static DPIDandPort parseLLDP(final byte[] packet) { 345 public static DPIDandPort parseLLDP(final byte[] packet) {
......