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

Commit

Permalink
1.5.3.RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
ardikars committed Jan 3, 2019
1 parent 0577d7a commit f34190a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 34 deletions.
40 changes: 9 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Jxnet wraps a native packet capture library (libpcap/npcap) via JNI (Java Native
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4d6ca7f3d9214098b1436990ac76a6cd)](https://www.codacy.com/project/jxnet/Jxnet/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jxnet/Jxnet&utm_campaign=Badge_Grade_Dashboard)
[![Build status](https://ci.appveyor.com/api/projects/status/ev4t6t1ssacwj18j?svg=true)](https://ci.appveyor.com/project/jxnet/jxnet)

[ ![Download](https://api.bintray.com/packages/ardikars/maven/com.ardikars.jxnet/images/download.svg?version=1.4.9.Final) ](https://bintray.com/ardikars/maven/com.ardikars.jxnet/1.4.9.Final/link)
[ ![Download](https://api.bintray.com/packages/ardikars/maven/com.ardikars.jxnet/images/download.svg?version=1.5.3.RELEASE) ](https://bintray.com/ardikars/maven/com.ardikars.jxnet/1.5.3.RELEASE/link)


Features
Expand Down Expand Up @@ -63,7 +63,7 @@ List of supported protocol available at [Jxpacket](https://github.com/jxnet/Jxpa
>>> <dependency>
>>> <groupId>com.ardikars.jxnet</groupId>
>>> <artifactId>jxnet</artifactId>
>>> <version>1.4.9.Final</version>
>>> <version>1.5.3.RELEASE</version>
>>> <type>pom</type>
>>> <scope>import</scope>
>>> </dependency>
Expand All @@ -82,45 +82,23 @@ List of supported protocol available at [Jxpacket](https://github.com/jxnet/Jxpa
>>> }
>>>
>>> dependencyManagement {
>>> imports { mavenBom("com.ardikars.jxnet:jxnet:1.4.9.Final") }
>>> imports { mavenBom("com.ardikars.jxnet:jxnet:1.5.3.RELEASE") }
>>> }
>>> ```

- ##### Example Application

```java
@SpringBootApplication
public class Application implements CommandLineRunner {

public class Application extends AbstractJxnetApplicationRunner<String> {
public static final int MAX_PACKET = -1; // infinite loop

private static final Logger LOGGER = LoggerFactory.getLogger(Application.class.getName());

private Context context;
private PcapIf pcapIf;
private MacAddress macAddress;

@Autowired
private PcapHandler<String> pcapHandler;

public Application(Context context, PcapIf pcapIf, MacAddress macAddress) {
this.context = context;
this.pcapIf = pcapIf;
this.macAddress = macAddress;
}


@Override
public void run(String... args) throws Exception {
LOGGER.info("Network Interface : {}", pcapIf.getName());
LOGGER.info("MAC Address : {}", macAddress);
LOGGER.info("Addresses : ");
for (PcapAddr addr : pcapIf.getAddresses()) {
if (addr.getAddr().getSaFamily() == SockAddr.Family.AF_INET) {
LOGGER.info("\tAddress : {}", Inet4Address.valueOf(addr.getAddr().getData()));
LOGGER.info("\tNetwork : {}", Inet4Address.valueOf(addr.getNetmask().getData()));
}
}
context.pcapLoop(MAX_PACKET, pcapHandler, "Jxnet!");
showSystemInfo();
showNetworkInfo();
loop(MAX_PACKET, "Jxnet!");
}

public static void main(String[] args) {
Expand Down
6 changes: 3 additions & 3 deletions gradle/configure.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {

NAME = 'Jxnet'
GROUP = 'com.ardikars.jxnet'
VERSION = '1.5.3.RC7'
VERSION = '1.5.3.RELEASE'
DESCRIPTION = 'Jxnet is a java library for capturing and sending network packet.'

NDK_HOME = "${System.env.NDK_HOME}"
Expand All @@ -31,8 +31,8 @@ ext {
PMD_VERION = '6.10.0'
JACOCO_VERSION = '0.8.2'

COMMON_VERSION = '1.2.6.RC7'
JXPACKET_VERSION = '1.2.1.RELEASE'
COMMON_VERSION = '1.2.6.RELEASE'
JXPACKET_VERSION = '1.2.2.RELEASE'
NETTY_VERSION = '4.1.31.Final'
REACTOR_VERSION = 'Californium-RELEASE'
JNR_VERSION = '2.1.9'
Expand Down

0 comments on commit f34190a

Please sign in to comment.