Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ardikars committed May 1, 2019
2 parents d305e30 + 7cb1260 commit f8b2d1f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
6 changes: 2 additions & 4 deletions gradle/configure.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {

NAME = 'Jxpacket'
GROUP = 'com.ardikars.jxpacket'
VERSION = '1.2.3.RELEASE'
VERSION = '1.2.4.RELEASE'
DESCRIPTION = 'Jxpacket is a network packet crafting library for java.'

MAVEN_LOCAL_REPOSITORY = "${System.env.HOME}/.m2/repository"
Expand All @@ -24,9 +24,7 @@ ext {
PMD_VERION = '6.5.0'
JACOCO_VERSION = '0.8.2'

COMMON_VERSION = '1.2.7.RELEASE'
SPRING_BOOT_VERSION = '2.0.4.RELEASE'
PCAP4J_VERSION = '1.7.3'
COMMON_VERSION = '1.2.8.RELEASE'

pom_project = {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
package com.ardikars.jxpacket.core.ip.ip6;

import com.ardikars.common.memory.Memory;
import com.ardikars.common.util.Strings;
import com.ardikars.common.util.Validate;
import com.ardikars.jxpacket.common.AbstractPacket;
import com.ardikars.jxpacket.common.Packet;
import com.ardikars.jxpacket.common.layer.TransportLayer;

import java.util.Arrays;

public class Authentication extends AbstractPacket {

private final Authentication.Header header;
Expand Down Expand Up @@ -136,7 +135,7 @@ public String toString() {
.append("\t\tpayloadLength: ").append(payloadLength).append('\n')
.append("\t\tsecurityParameterIndex: ").append(securityParameterIndex).append('\n')
.append("\t\tsequenceNumber: ").append(sequenceNumber).append('\n')
.append("\t\tintegrityCheckValue: ").append(Arrays.toString(integrityCheckValue)).append('\n')
.append("\t\tintegrityCheckValue: ").append(Strings.toHexString(integrityCheckValue)).append('\n')
.toString();
}

Expand Down Expand Up @@ -200,6 +199,7 @@ public Packet build() {
public Packet build(final Memory buffer) {
this.nextHeader = TransportLayer.valueOf(buffer.readByte());
this.payloadLength = buffer.readByte();
buffer.readShort(); // reserved
this.securityParameterIndex = buffer.readInt();
this.sequenceNumber = buffer.readInt();
this.integrityCheckValue = new byte[(this.payloadLength + 2) * 4 - 12];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
package com.ardikars.jxpacket.core.ip.ip6;

import com.ardikars.common.memory.Memory;
import com.ardikars.common.util.Strings;
import com.ardikars.jxpacket.common.AbstractPacket;
import com.ardikars.jxpacket.common.layer.TransportLayer;
import com.ardikars.jxpacket.core.ip.Ip6;

import java.util.Arrays;

public abstract class Options extends AbstractPacket {

protected abstract static class Header extends Ip6.ExtensionHeader {
Expand Down Expand Up @@ -86,7 +85,7 @@ public String toString() {
return new StringBuilder()
.append("\t\tnextHeader: ").append(nextHeader).append('\n')
.append("\t\textensionLength: ").append(extensionLength).append('\n')
.append("\t\toptions: ").append(Arrays.toString(options)).append('\n')
.append("\t\toptions: ").append(Strings.toHexString(options)).append('\n')
.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

import com.ardikars.common.memory.Memory;
import com.ardikars.common.util.NamedNumber;
import com.ardikars.common.util.Strings;
import com.ardikars.common.util.Validate;
import com.ardikars.jxpacket.common.AbstractPacket;
import com.ardikars.jxpacket.common.Packet;
import com.ardikars.jxpacket.common.layer.TransportLayer;
import com.ardikars.jxpacket.core.ip.Ip6;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -133,7 +133,7 @@ public String toString() {
.append("\t\textensionLength: ").append(extensionLength).append('\n')
.append("\t\troutingType: ").append(routingType).append('\n')
.append("\t\tsegmentLeft: ").append(segmentLeft).append('\n')
.append("\t\troutingData: ").append(Arrays.toString(routingData)).append('\n')
.append("\t\troutingData: ").append(Strings.toHexString(routingData)).append('\n')
.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

import com.ardikars.common.memory.Memory;
import com.ardikars.common.util.NamedNumber;
import com.ardikars.common.util.Strings;
import com.ardikars.jxpacket.common.AbstractPacket;
import com.ardikars.jxpacket.common.Packet;
import com.ardikars.jxpacket.common.UnknownPacket;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -215,7 +215,7 @@ public String toString() {
.append("Type: ")
.append(this.getType())
.append(", Data: ")
.append(Arrays.toString(this.getData()))
.append(Strings.toHexString(this.getData()))
.append("]").toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
package com.ardikars.jxpacket.core.tcp;

import com.ardikars.common.memory.Memory;
import com.ardikars.common.util.Strings;
import com.ardikars.common.util.Validate;
import com.ardikars.jxpacket.common.AbstractPacket;
import com.ardikars.jxpacket.common.Packet;
import com.ardikars.jxpacket.common.layer.ApplicationLayer;

import java.util.Arrays;

public class Tcp extends AbstractPacket {

private final Tcp.Header header;
Expand Down Expand Up @@ -181,7 +180,7 @@ public String toString() {
.append("\twindowSize: ").append(windowSize).append('\n')
.append("\tchecksum: ").append(checksum).append('\n')
.append("\turgentPointer: ").append(urgentPointer).append('\n')
.append("\toptions: ").append(Arrays.toString(options)).append('\n')
.append("\toptions: ").append(Strings.toHexString(options)).append('\n')
.toString();
}

Expand Down

0 comments on commit f8b2d1f

Please sign in to comment.