Showing
17 changed files
with
10 additions
and
24 deletions
... | @@ -5,7 +5,7 @@ import org.projectfloodlight.openflow.protocol.OFPacketIn; | ... | @@ -5,7 +5,7 @@ import org.projectfloodlight.openflow.protocol.OFPacketIn; |
5 | import org.projectfloodlight.openflow.protocol.OFPacketOut; | 5 | import org.projectfloodlight.openflow.protocol.OFPacketOut; |
6 | import org.projectfloodlight.openflow.types.OFPort; | 6 | import org.projectfloodlight.openflow.types.OFPort; |
7 | 7 | ||
8 | -public class DefaultPacketContext implements PacketContext { | 8 | +public final class DefaultPacketContext implements PacketContext { |
9 | 9 | ||
10 | private boolean free = true; | 10 | private boolean free = true; |
11 | private boolean isBuilt = false; | 11 | private boolean isBuilt = false; |
... | @@ -55,7 +55,7 @@ public class DefaultPacketContext implements PacketContext { | ... | @@ -55,7 +55,7 @@ public class DefaultPacketContext implements PacketContext { |
55 | return null; | 55 | return null; |
56 | } | 56 | } |
57 | 57 | ||
58 | - public static PacketContext PacketContextFromPacketIn(OpenFlowSwitch s, OFPacketIn pkt) { | 58 | + public static PacketContext packetContextFromPacketIn(OpenFlowSwitch s, OFPacketIn pkt) { |
59 | return new DefaultPacketContext(s, pkt); | 59 | return new DefaultPacketContext(s, pkt); |
60 | } | 60 | } |
61 | 61 | ... | ... |
... | @@ -37,7 +37,7 @@ import java.util.Arrays; | ... | @@ -37,7 +37,7 @@ import java.util.Arrays; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * | 39 | * |
40 | - * @author David Erickson (daviderickson@cs.stanford.edu) | 40 | + * |
41 | */ | 41 | */ |
42 | public class ARP extends BasePacket { | 42 | public class ARP extends BasePacket { |
43 | public static final short HW_TYPE_ETHERNET = 0x1; | 43 | public static final short HW_TYPE_ETHERNET = 0x1; | ... | ... |
... | @@ -34,7 +34,7 @@ package org.onlab.packet; | ... | @@ -34,7 +34,7 @@ package org.onlab.packet; |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * | 36 | * |
37 | - * @author David Erickson (daviderickson@cs.stanford.edu) | 37 | + * |
38 | */ | 38 | */ |
39 | public abstract class BasePacket implements IPacket { | 39 | public abstract class BasePacket implements IPacket { |
40 | protected IPacket parent; | 40 | protected IPacket parent; | ... | ... |
... | @@ -40,7 +40,6 @@ import java.util.ListIterator; | ... | @@ -40,7 +40,6 @@ import java.util.ListIterator; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * | 42 | * |
43 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
44 | */ | 43 | */ |
45 | public class DHCP extends BasePacket { | 44 | public class DHCP extends BasePacket { |
46 | /** | 45 | /** | ... | ... |
... | @@ -36,7 +36,6 @@ import java.util.Arrays; | ... | @@ -36,7 +36,6 @@ import java.util.Arrays; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * | 38 | * |
39 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
40 | */ | 39 | */ |
41 | public class DHCPOption { | 40 | public class DHCPOption { |
42 | protected byte code; | 41 | protected byte code; | ... | ... |
... | @@ -36,7 +36,6 @@ import java.util.Arrays; | ... | @@ -36,7 +36,6 @@ import java.util.Arrays; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * | 38 | * |
39 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
40 | */ | 39 | */ |
41 | public class Data extends BasePacket { | 40 | public class Data extends BasePacket { |
42 | protected byte[] data; | 41 | protected byte[] data; | ... | ... |
... | @@ -40,7 +40,6 @@ import java.util.Map; | ... | @@ -40,7 +40,6 @@ import java.util.Map; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * | 42 | * |
43 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
44 | */ | 43 | */ |
45 | public class Ethernet extends BasePacket { | 44 | public class Ethernet extends BasePacket { |
46 | private static final String HEXES = "0123456789ABCDEF"; | 45 | private static final String HEXES = "0123456789ABCDEF"; | ... | ... |
... | @@ -37,7 +37,6 @@ import java.nio.ByteBuffer; | ... | @@ -37,7 +37,6 @@ import java.nio.ByteBuffer; |
37 | /** | 37 | /** |
38 | * Implements ICMP packet format. | 38 | * Implements ICMP packet format. |
39 | * | 39 | * |
40 | - * @author shudong.zhou@bigswitch.com | ||
41 | */ | 40 | */ |
42 | public class ICMP extends BasePacket { | 41 | public class ICMP extends BasePacket { |
43 | protected byte icmpType; | 42 | protected byte icmpType; | ... | ... |
... | @@ -42,7 +42,6 @@ import java.util.HashMap; | ... | @@ -42,7 +42,6 @@ import java.util.HashMap; |
42 | import java.util.Map; | 42 | import java.util.Map; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
46 | * | 45 | * |
47 | */ | 46 | */ |
48 | public class IPv4 extends BasePacket { | 47 | public class IPv4 extends BasePacket { |
... | @@ -472,10 +471,10 @@ public class IPv4 extends BasePacket { | ... | @@ -472,10 +471,10 @@ public class IPv4 extends BasePacket { |
472 | int result = 0; | 471 | int result = 0; |
473 | for (int i = 0; i < 4; ++i) { | 472 | for (int i = 0; i < 4; ++i) { |
474 | result = ipAddress >> (3 - i) * 8 & 0xff; | 473 | result = ipAddress >> (3 - i) * 8 & 0xff; |
475 | - sb.append(Integer.valueOf(result).toString()); | 474 | + sb.append(Integer.valueOf(result).toString()); |
476 | - if (i != 3) { | 475 | + if (i != 3) { |
477 | - sb.append("."); | 476 | + sb.append("."); |
478 | - } | 477 | + } |
479 | } | 478 | } |
480 | return sb.toString(); | 479 | return sb.toString(); |
481 | } | 480 | } | ... | ... |
... | @@ -38,7 +38,6 @@ import java.nio.ByteBuffer; | ... | @@ -38,7 +38,6 @@ import java.nio.ByteBuffer; |
38 | * This class represents an Link Local Control header that is used in Ethernet | 38 | * This class represents an Link Local Control header that is used in Ethernet |
39 | * 802.3. | 39 | * 802.3. |
40 | * | 40 | * |
41 | - * @author alexreimers | ||
42 | * | 41 | * |
43 | */ | 42 | */ |
44 | public class LLC extends BasePacket { | 43 | public class LLC extends BasePacket { | ... | ... |
... | @@ -40,7 +40,6 @@ import java.util.ArrayList; | ... | @@ -40,7 +40,6 @@ import java.util.ArrayList; |
40 | import java.util.List; | 40 | import java.util.List; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
44 | * | 43 | * |
45 | */ | 44 | */ |
46 | public class LLDP extends BasePacket { | 45 | public class LLDP extends BasePacket { | ... | ... |
... | @@ -36,7 +36,6 @@ import java.util.Arrays; | ... | @@ -36,7 +36,6 @@ import java.util.Arrays; |
36 | /** | 36 | /** |
37 | * The class representing LLDP Organizationally Specific TLV. | 37 | * The class representing LLDP Organizationally Specific TLV. |
38 | * | 38 | * |
39 | - * @author Sho Shimizu (sho.shimizu@gmail.com) | ||
40 | */ | 39 | */ |
41 | public class LLDPOrganizationalTLV extends LLDPTLV { | 40 | public class LLDPOrganizationalTLV extends LLDPTLV { |
42 | public static final int OUI_LENGTH = 3; | 41 | public static final int OUI_LENGTH = 3; |
... | @@ -163,8 +162,8 @@ public class LLDPOrganizationalTLV extends LLDPTLV { | ... | @@ -163,8 +162,8 @@ public class LLDPOrganizationalTLV extends LLDPTLV { |
163 | this.setSubType(optionalField.get()); | 162 | this.setSubType(optionalField.get()); |
164 | 163 | ||
165 | final byte[] infoString = new byte[this.getLength() | 164 | final byte[] infoString = new byte[this.getLength() |
166 | - - LLDPOrganizationalTLV.OUI_LENGTH | 165 | + - LLDPOrganizationalTLV.OUI_LENGTH |
167 | - - LLDPOrganizationalTLV.SUBTYPE_LENGTH]; | 166 | + - LLDPOrganizationalTLV.SUBTYPE_LENGTH]; |
168 | optionalField.get(infoString); | 167 | optionalField.get(infoString); |
169 | this.setInfoString(infoString); | 168 | this.setInfoString(infoString); |
170 | return this; | 169 | return this; | ... | ... |
... | @@ -38,7 +38,6 @@ import java.util.Arrays; | ... | @@ -38,7 +38,6 @@ import java.util.Arrays; |
38 | /** | 38 | /** |
39 | * | 39 | * |
40 | * | 40 | * |
41 | - * @author David Erickson (daviderickson@cs.stanford.edu) | ||
42 | */ | 41 | */ |
43 | public class LLDPTLV { | 42 | public class LLDPTLV { |
44 | protected byte type; | 43 | protected byte type; | ... | ... |
... | @@ -20,7 +20,6 @@ import java.util.Arrays; | ... | @@ -20,7 +20,6 @@ import java.util.Arrays; |
20 | /** | 20 | /** |
21 | * The class representing MAC address. | 21 | * The class representing MAC address. |
22 | * | 22 | * |
23 | - * @author Sho Shimizu (sho.shimizu@gmail.com) | ||
24 | */ | 23 | */ |
25 | public class MACAddress { | 24 | public class MACAddress { |
26 | public static final int MAC_ADDRESS_LENGTH = 6; | 25 | public static final int MAC_ADDRESS_LENGTH = 6; | ... | ... |
-
Please register or login to post a comment