Yuta HIGUCHI

rest

Change-Id: If0d838d02690ad4bb581152b40d366c124826634
......@@ -95,6 +95,7 @@ public class DHCP extends BasePacket {
/**
* @param opCode
* the opCode to set
* @return this
*/
public DHCP setOpCode(final byte opCode) {
this.opCode = opCode;
......@@ -111,6 +112,7 @@ public class DHCP extends BasePacket {
/**
* @param hardwareType
* the hardwareType to set
* @return this
*/
public DHCP setHardwareType(final byte hardwareType) {
this.hardwareType = hardwareType;
......@@ -127,6 +129,7 @@ public class DHCP extends BasePacket {
/**
* @param hardwareAddressLength
* the hardwareAddressLength to set
* @return this
*/
public DHCP setHardwareAddressLength(final byte hardwareAddressLength) {
this.hardwareAddressLength = hardwareAddressLength;
......@@ -143,6 +146,7 @@ public class DHCP extends BasePacket {
/**
* @param hops
* the hops to set
* @return this
*/
public DHCP setHops(final byte hops) {
this.hops = hops;
......@@ -159,6 +163,7 @@ public class DHCP extends BasePacket {
/**
* @param transactionId
* the transactionId to set
* @return this
*/
public DHCP setTransactionId(final int transactionId) {
this.transactionId = transactionId;
......@@ -175,6 +180,7 @@ public class DHCP extends BasePacket {
/**
* @param seconds
* the seconds to set
* @return this
*/
public DHCP setSeconds(final short seconds) {
this.seconds = seconds;
......@@ -191,6 +197,7 @@ public class DHCP extends BasePacket {
/**
* @param flags
* the flags to set
* @return this
*/
public DHCP setFlags(final short flags) {
this.flags = flags;
......@@ -207,6 +214,7 @@ public class DHCP extends BasePacket {
/**
* @param clientIPAddress
* the clientIPAddress to set
* @return this
*/
public DHCP setClientIPAddress(final int clientIPAddress) {
this.clientIPAddress = clientIPAddress;
......@@ -223,6 +231,7 @@ public class DHCP extends BasePacket {
/**
* @param yourIPAddress
* the yourIPAddress to set
* @return this
*/
public DHCP setYourIPAddress(final int yourIPAddress) {
this.yourIPAddress = yourIPAddress;
......@@ -239,6 +248,7 @@ public class DHCP extends BasePacket {
/**
* @param serverIPAddress
* the serverIPAddress to set
* @return this
*/
public DHCP setServerIPAddress(final int serverIPAddress) {
this.serverIPAddress = serverIPAddress;
......@@ -255,6 +265,7 @@ public class DHCP extends BasePacket {
/**
* @param gatewayIPAddress
* the gatewayIPAddress to set
* @return this
*/
public DHCP setGatewayIPAddress(final int gatewayIPAddress) {
this.gatewayIPAddress = gatewayIPAddress;
......@@ -271,6 +282,7 @@ public class DHCP extends BasePacket {
/**
* @param clientHardwareAddress
* the clientHardwareAddress to set
* @return this
*/
public DHCP setClientHardwareAddress(final byte[] clientHardwareAddress) {
this.clientHardwareAddress = clientHardwareAddress;
......@@ -303,6 +315,7 @@ public class DHCP extends BasePacket {
/**
* @param options
* the options to set
* @return this
*/
public DHCP setOptions(final List<DHCPOption> options) {
this.options = options;
......@@ -334,6 +347,7 @@ public class DHCP extends BasePacket {
/**
* @param server
* the serverName to set
* @return this
*/
public DHCP setServerName(final String server) {
this.serverName = server;
......@@ -350,6 +364,7 @@ public class DHCP extends BasePacket {
/**
* @param bootFile
* the bootFileName to set
* @return this
*/
public DHCP setBootFileName(final String bootFile) {
this.bootFileName = bootFile;
......
......@@ -38,6 +38,7 @@ public class DHCPOption {
/**
* @param code
* the code to set
* @return this
*/
public DHCPOption setCode(final byte code) {
this.code = code;
......@@ -54,6 +55,7 @@ public class DHCPOption {
/**
* @param length
* the length to set
* @return this
*/
public DHCPOption setLength(final byte length) {
this.length = length;
......@@ -70,6 +72,7 @@ public class DHCPOption {
/**
* @param data
* the data to set
* @return this
*/
public DHCPOption setData(final byte[] data) {
this.data = data;
......
......@@ -255,6 +255,7 @@ public class Ethernet extends BasePacket {
*
* @param pd
* the pad to set
* @return this
*/
public Ethernet setPad(final boolean pd) {
this.pad = pd;
......@@ -345,7 +346,7 @@ public class Ethernet extends BasePacket {
/**
* Checks to see if a string is a valid MAC address.
*
* @param macAddress
* @param macAddress string to test if it is a valid MAC
* @return True if macAddress is a valid MAC, False otherwise
*/
public static boolean isMACAddress(final String macAddress) {
......@@ -368,7 +369,7 @@ public class Ethernet extends BasePacket {
* matter, and returns a corresponding byte[].
*
* @param macAddress
* The MAC address to convert into a bye array
* The MAC address to convert into a byte array
* @return The macAddress as a byte array
*/
public static byte[] toMACAddress(final String macAddress) {
......@@ -379,7 +380,7 @@ public class Ethernet extends BasePacket {
* Accepts a MAC address and returns the corresponding long, where the MAC
* bytes are set on the lower order bytes of the long.
*
* @param macAddress
* @param macAddress MAC address as a byte array
* @return a long containing the mac address bytes
*/
public static long toLong(final byte[] macAddress) {
......@@ -389,7 +390,7 @@ public class Ethernet extends BasePacket {
/**
* Converts a long MAC address to a byte array.
*
* @param macAddress
* @param macAddress MAC address set on the lower order bytes of the long
* @return the bytes of the mac address
*/
public static byte[] toByteArray(final long macAddress) {
......
......@@ -39,6 +39,7 @@ public class ICMP extends BasePacket {
/**
* @param icmpType
* to set
* @return this
*/
public ICMP setIcmpType(final byte icmpType) {
this.icmpType = icmpType;
......@@ -55,6 +56,7 @@ public class ICMP extends BasePacket {
/**
* @param icmpCode
* code to set
* @return this
*/
public ICMP setIcmpCode(final byte icmpCode) {
this.icmpCode = icmpCode;
......@@ -71,6 +73,7 @@ public class ICMP extends BasePacket {
/**
* @param checksum
* the checksum to set
* @return this
*/
public ICMP setChecksum(final short checksum) {
this.checksum = checksum;
......
......@@ -76,6 +76,7 @@ public class IPv4 extends BasePacket {
/**
* @param version
* the version to set
* @return this
*/
public IPv4 setVersion(final byte version) {
this.version = version;
......@@ -99,6 +100,7 @@ public class IPv4 extends BasePacket {
/**
* @param diffServ
* the diffServ to set
* @return this
*/
public IPv4 setDiffServ(final byte diffServ) {
this.diffServ = diffServ;
......@@ -130,6 +132,7 @@ public class IPv4 extends BasePacket {
/**
* @param identification
* the identification to set
* @return this
*/
public IPv4 setIdentification(final short identification) {
this.identification = identification;
......@@ -146,7 +149,8 @@ public class IPv4 extends BasePacket {
/**
* @param flags
* the flags to set
*/
* @return this
s */
public IPv4 setFlags(final byte flags) {
this.flags = flags;
return this;
......@@ -162,6 +166,7 @@ public class IPv4 extends BasePacket {
/**
* @param fragmentOffset
* the fragmentOffset to set
* @return this
*/
public IPv4 setFragmentOffset(final short fragmentOffset) {
this.fragmentOffset = fragmentOffset;
......@@ -178,6 +183,7 @@ public class IPv4 extends BasePacket {
/**
* @param ttl
* the ttl to set
* @return this
*/
public IPv4 setTtl(final byte ttl) {
this.ttl = ttl;
......@@ -194,6 +200,7 @@ public class IPv4 extends BasePacket {
/**
* @param protocol
* the protocol to set
* @return this
*/
public IPv4 setProtocol(final byte protocol) {
this.protocol = protocol;
......@@ -210,6 +217,7 @@ public class IPv4 extends BasePacket {
/**
* @param checksum
* the checksum to set
* @return this
*/
public IPv4 setChecksum(final short checksum) {
this.checksum = checksum;
......@@ -232,6 +240,7 @@ public class IPv4 extends BasePacket {
/**
* @param sourceAddress
* the sourceAddress to set
* @return this
*/
public IPv4 setSourceAddress(final int sourceAddress) {
this.sourceAddress = sourceAddress;
......@@ -241,6 +250,7 @@ public class IPv4 extends BasePacket {
/**
* @param sourceAddress
* the sourceAddress to set
* @return this
*/
public IPv4 setSourceAddress(final String sourceAddress) {
this.sourceAddress = IPv4.toIPv4Address(sourceAddress);
......@@ -257,6 +267,7 @@ public class IPv4 extends BasePacket {
/**
* @param destinationAddress
* the destinationAddress to set
* @return this
*/
public IPv4 setDestinationAddress(final int destinationAddress) {
this.destinationAddress = destinationAddress;
......@@ -266,6 +277,7 @@ public class IPv4 extends BasePacket {
/**
* @param destinationAddress
* the destinationAddress to set
* @return this
*/
public IPv4 setDestinationAddress(final String destinationAddress) {
this.destinationAddress = IPv4.toIPv4Address(destinationAddress);
......@@ -282,6 +294,7 @@ public class IPv4 extends BasePacket {
/**
* @param options
* the options to set
* @return this
*/
public IPv4 setOptions(final byte[] options) {
if (options != null && options.length % 4 > 0) {
......
......@@ -48,6 +48,7 @@ public class LLDP extends BasePacket {
/**
* @param chassis
* the chassisId to set
* @return this
*/
public LLDP setChassisId(final LLDPTLV chassis) {
this.chassisId = chassis;
......@@ -64,6 +65,7 @@ public class LLDP extends BasePacket {
/**
* @param portId
* the portId to set
* @return this
*/
public LLDP setPortId(final LLDPTLV portId) {
this.portId = portId;
......@@ -80,6 +82,7 @@ public class LLDP extends BasePacket {
/**
* @param ttl
* the ttl to set
* @return this
*/
public LLDP setTtl(final LLDPTLV ttl) {
this.ttl = ttl;
......@@ -96,6 +99,7 @@ public class LLDP extends BasePacket {
/**
* @param optionalTLVList
* the optionalTLVList to set
* @return this
*/
public LLDP setOptionalTLVList(final List<LLDPTLV> optionalTLVList) {
this.optionalTLVList = optionalTLVList;
......
......@@ -40,6 +40,7 @@ public class LLDPTLV {
/**
* @param type
* the type to set
* @return this
*/
public LLDPTLV setType(final byte type) {
this.type = type;
......@@ -56,6 +57,7 @@ public class LLDPTLV {
/**
* @param length
* the length to set
* @return this
*/
public LLDPTLV setLength(final short length) {
this.length = length;
......@@ -72,6 +74,7 @@ public class LLDPTLV {
/**
* @param value
* the value to set
* @return this
*/
public LLDPTLV setValue(final byte[] value) {
this.value = value;
......
......@@ -46,6 +46,7 @@ public class TCP extends BasePacket {
/**
* @param sourcePort
* the sourcePort to set
* @return this
*/
public TCP setSourcePort(final short sourcePort) {
this.sourcePort = sourcePort;
......@@ -62,6 +63,7 @@ public class TCP extends BasePacket {
/**
* @param destinationPort
* the destinationPort to set
* @return this
*/
public TCP setDestinationPort(final short destinationPort) {
this.destinationPort = destinationPort;
......@@ -157,6 +159,7 @@ public class TCP extends BasePacket {
/**
* @param checksum
* the checksum to set
* @return this
*/
public TCP setChecksum(final short checksum) {
this.checksum = checksum;
......
......@@ -57,6 +57,7 @@ public class UDP extends BasePacket {
/**
* @param sourcePort
* the sourcePort to set
* @return this
*/
public UDP setSourcePort(final short sourcePort) {
this.sourcePort = sourcePort;
......@@ -73,6 +74,7 @@ public class UDP extends BasePacket {
/**
* @param destinationPort
* the destinationPort to set
* @return this
*/
public UDP setDestinationPort(final short destinationPort) {
this.destinationPort = destinationPort;
......@@ -96,6 +98,7 @@ public class UDP extends BasePacket {
/**
* @param checksum
* the checksum to set
* @return this
*/
public UDP setChecksum(final short checksum) {
this.checksum = checksum;
......