Updated to use the version from common

connection_type_change
Robinson 2022-04-04 12:56:42 +02:00
parent 573098c5a4
commit 44c0d1a756
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
18 changed files with 38 additions and 23 deletions

View File

@ -7,7 +7,7 @@ object Arp {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
// Now setup ARP Proxy for this interface (so ARP requests are answered correctly)
fun proxyAdd(interfaceName: String) {

View File

@ -10,7 +10,7 @@ object Dhcp {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
fun start(id: String, interfaceName: String) {
if (Common.OS_LINUX) {

View File

@ -18,7 +18,7 @@ object Dns {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
const val DEFAULT_SEARCH_DOMAIN = ""

View File

@ -3,8 +3,16 @@ package dorkbox.netUtil
import dorkbox.netUtil.Common.logger
import java.io.BufferedReader
import java.io.InputStreamReader
import java.net.*
import java.util.regex.Pattern
import java.net.Inet4Address
import java.net.Inet6Address
import java.net.InetAddress
import java.net.InetSocketAddress
import java.net.NetworkInterface
import java.net.Socket
import java.net.SocketException
import java.net.URL
import java.net.UnknownHostException
import java.util.regex.*
/**
* A class that holds a number of network-related constants, also from:
@ -20,7 +28,7 @@ object IP {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
/**
* The [InetAddress] that represents the loopback address. If IPv6 stack is available, it will refer to

View File

@ -4,13 +4,12 @@ import java.io.BufferedWriter
import java.io.File
import java.io.FileWriter
import java.io.IOException
import java.util.*
object IPRoute {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
private val reservedTable = StringBuilder(2048)
private val tableNames: MutableMap<Int, String?> = HashMap(256)

View File

@ -42,7 +42,7 @@ object IPv4 {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
/**
* Returns `true` if IPv4 should be used even if the system supports both IPv4 and IPv6. Setting this

View File

@ -33,7 +33,7 @@ object IPv6 {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
// used for subnet mask info
private val MINUS_ONE = BigInteger.valueOf(-1)

View File

@ -9,7 +9,7 @@ object IfConfig {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
fun assignMac(interfaceName: String, interfaceMac: String) {
if (Common.OS_LINUX) {

View File

@ -9,7 +9,7 @@ object Iface {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
private val ifToIp: MutableMap<String, String> = HashMap()

View File

@ -24,7 +24,7 @@ object Inet4 {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
/**
* Returns the [Inet4Address] representation of a [String] IP or host address.

View File

@ -24,7 +24,7 @@ object Inet6 {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
/**
* Returns the [Inet6Address] representation of a [String] IP or host address.

View File

@ -19,7 +19,7 @@ object Mac {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
enum class MacDelimiter(val delimiter: String) {
COLON(":"),

View File

@ -10,7 +10,7 @@ object NameSpace {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
object Route {
fun flush(nameSpace: String) {

View File

@ -9,7 +9,7 @@ object Route {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
fun flush() {
Executor.run("/sbin/ip", "route", "flush", "cache")

View File

@ -4,7 +4,7 @@ import java.net.DatagramPacket
import java.net.DatagramSocket
import java.net.InetAddress
import java.util.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.*
/**
* SNTP client for retrieving time.
@ -20,7 +20,7 @@ object Sntp {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
/**
* SNTP client for retrieving time.

View File

@ -16,7 +16,15 @@
package dorkbox.netUtil
import java.io.IOException
import java.net.*
import java.net.InetAddress
import java.net.InetSocketAddress
import java.net.NetworkInterface
import java.net.ServerSocket
import java.net.Socket
import java.net.SocketAddress
import java.net.SocketException
import java.net.SocketPermission
import java.net.UnknownHostException
import java.nio.channels.DatagramChannel
import java.nio.channels.ServerSocketChannel
import java.nio.channels.SocketChannel
@ -37,7 +45,7 @@ object SocketUtils {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
private val EMPTY = Collections.enumeration(emptyList<Any>())

View File

@ -6,7 +6,7 @@ object VirtualEth {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
fun add(host: String, guest: String) {
if (Common.OS_LINUX) {

View File

@ -16,7 +16,7 @@ class Ping {
/**
* Gets the version number.
*/
const val version = "2.9.1"
const val version = Common.version
}
private val count = 4