// Path: jxnet-core/src/main/java/com/ardikars/jxnet/exception/NativeException.java
// public class NativeException extends RuntimeException {
// 
// 	private static final long serialVersionUID = -3993889826336916332L;
// 
// 	public NativeException() {
// 		this("");
// 	}
// 
// 	public NativeException(final String message) {
// 		this(message, new RuntimeException(message));
// 	}
// 
// 	public NativeException(final Throwable cause) {
// 		this(cause.getMessage(), cause);
// 	}
// 
// 	public NativeException(final String message, final Throwable cause) {
// 		super(message, cause);
// 	}
// 
// }


import com.ardikars.common.annotation.Mutable;
import com.ardikars.common.util.Validate;
import com.ardikars.jxnet.exception.NativeException;
import java.io.IOException;
import java.util.concurrent.locks.ReentrantReadWriteLock;
		 */
		public Builder netmask(final int netmask) {
			this.netmask = netmask;
			return this;
		}

		/**
		 * Bpf compile mode.
		 * @param bpfCompileMode bpf compile mode.
		 * @return returns BpfProgram Builder.
		 */
		public Builder bpfCompileMode(final BpfCompileMode bpfCompileMode) {
			this.bpfCompileMode = bpfCompileMode;
			return this;
		}

		/**
		 * Create instance of BpfProgram.
		 * @return returns BpfProgram.
		 */
		private BpfProgram buildBpf() {
			Validate.notIllegalArgument(pcap != null,
					new IllegalArgumentException("Pcap handle should be not null."));
			Validate.notIllegalArgument(!pcap.isClosed(),
					new IllegalArgumentException("Pcap handle is closed."));
			Validate.notIllegalArgument(filter != null && !filter.equals(""),
					new IllegalArgumentException("Filter expression should be not null or empty."));

			BpfProgram bpfProgram = new BpfProgram();
			if (Jxnet.PcapCompile(pcap, bpfProgram, filter, bpfCompileMode.getValue(), netmask) < Jxnet.OK) {
// Path: jxnet-core/src/main/java/com/ardikars/jxnet/exception/NativeException.java
// public class NativeException extends RuntimeException {
// 
// 	private static final long serialVersionUID = -3993889826336916332L;
// 
// 	public NativeException() {
// 		this("");
// 	}
// 
// 	public NativeException(final String message) {
// 		this(message, new RuntimeException(message));
// 	}
// 
// 	public NativeException(final Throwable cause) {
// 		this(cause.getMessage(), cause);
// 	}
// 
// 	public NativeException(final String message, final Throwable cause) {
// 		super(message, cause);
// 	}
// 
// }


// Path: jxnet-core/src/main/java/com/ardikars/jxnet/BpfProgram.java
import com.ardikars.common.annotation.Mutable;
import com.ardikars.common.util.Validate;
import com.ardikars.jxnet.exception.NativeException;
import java.io.IOException;
import java.util.concurrent.locks.ReentrantReadWriteLock;

		 */
		public Builder netmask(final int netmask) {
			this.netmask = netmask;
			return this;
		}

		/**
		 * Bpf compile mode.
		 * @param bpfCompileMode bpf compile mode.
		 * @return returns BpfProgram Builder.
		 */
		public Builder bpfCompileMode(final BpfCompileMode bpfCompileMode) {
			this.bpfCompileMode = bpfCompileMode;
			return this;
		}

		/**
		 * Create instance of BpfProgram.
		 * @return returns BpfProgram.
		 */
		private BpfProgram buildBpf() {
			Validate.notIllegalArgument(pcap != null,
					new IllegalArgumentException("Pcap handle should be not null."));
			Validate.notIllegalArgument(!pcap.isClosed(),
					new IllegalArgumentException("Pcap handle is closed."));
			Validate.notIllegalArgument(filter != null && !filter.equals(""),
					new IllegalArgumentException("Filter expression should be not null or empty."));

			BpfProgram bpfProgram = new BpfProgram();
			if (Jxnet.PcapCompile(pcap, bpfProgram, filter, bpfCompileMode.getValue(), netmask) < Jxnet.OK) {
				throw new NativeException(Jxnet.PcapGetErr(pcap));