ip-address

How do I create a regex for ipaddress to be used with other patterns in PL SQL

I need to write a regular expression in order to be able to match the following patterns: IF:en0 IF:en0:10.94.80.78 IF:en11 IF:en11:10.94.80.78 The regular expression i wrote in PL SQL was IF REGEXP_LIKE(input_str, '^IF:en([0-9])([:]?)((25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})$') then DB...

Easiest way to find free IPAddress in current subnet?

What is the easiest way to find the next unused IP address on a local adaptors subnet? IPAddress GetNextFreeIP(NetworkInterface intface) { ...? } Update I've written a BOOTP/TFTP server that could be used in many different scenarios (cross-over cable, small private network, large corporate network). I have to give the small embedd...

vpn connection and ip problem

i have one application who use to connect to server via VPN. i can put server name or Ip in application to connect to server. If i put IP & Connect to VPN (this work fine except if any other computer on network have same ip(of remote server)application stop). and if i put server name after connecting to VPN, server name is not resolve...

Regex for IPv4 Routable address only

What is a regex that can find a routable IPv4 addresses only? EG, does not match 192.0.2.1/24, 127.0.0.1, etc. Google seems to only find the all too common 'is an ip address' regex. ...

PHP Session Cookies fail with users changing IP

Hello, I have a login script for a small application that works by storing session cookies and checking them on each page to make sure the user is logged in. One of the two users who uses the system keeps getting logged out randomly. This appears to be down to the session cookie that shows then authenticated no longer being present. Aft...

VB6 IP4 - Calculate Net Mask (Long) from Number of Bits

Given input of 0 to 32, representing the number of one-bits in an IP4 network mask (corresponding to a CIDR block size as in /19), what's An elegant way to turn that into a four-byte long net mask A fast way way to turn that into a four-byte long net mask Prototype: Function NetMaskFromBitCount(BitCount As Long) As Long 'Logic he...

How to calculate the AND operation of an IPaddress and a subnet mask in C?

I have an IPaddress and subnet mask, both in unsigned long; how can I AND both of these and check whether my incoming ipaddress (ip2) belongs to the same subnet or not? like: if (ip1 & subnet == ip2 & subnet) then same subnet. ...

Iptables administration - Big list of IP addresses

Hello all, How can we create a table of IP addresses for NetFilter? I would like to do so, just like table directive of PacketFilter. Thank you for any help. ...

What regex can I use to match any valid IP-address represented in dot-decimal notation?

What regex can I use to match any valid IP-address represented in dot-decimal notation? ...

How can we do packet marking (TOS, identifier, flag fields) for IP address using java code

use of TOS, identifier, flag fields for IP address using java code for deterministic packet marking ...

IP addresses of agents registered with the Main Container in JADE?

I have a website at the back end of which I have a JADE main container running. Multiple machines can register with this main container. So, I want to know if the JADE API supports getting the IP addresses of all the agents currently registered with the Main container? I have to eventually display this information on the website. Thanks...

Find IP address in iphone

Hi, I want to find IP address in an application. I am able to find it. But, problem is, it works fins in iphone os 2.0 or so. But, in iphone os 3.0 it is giving me a warning: warning: no '+currentHost' method found warning: (Messages without a matching method signature) I am using this code, and it works fine with os version 2.0. -...

asp.net c# ip address lost after postback?

Hi all, One of my functions in a class is called GetIpAddress() which returns the following string: System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] This all works well in regular page loads and gets my ip address, but when i for example let a user place a comment, then the ip address is lost after postback and i g...

Limit ip address jetty

Hi, How can I make a virtual host on Jetty is only valid on some ip address? Effectively and as in Apache? I.e. I want to allow only host 123.123.123.123 to access http://8.8.3.3/mywebsite Thanks ...

What is the best way to get the computer name remotely based on an IP address?

I have several windows machines identified by ip address. I would like to write an application that query the computers remotely and gets their name. I cannot rely on DNS because it does not provide exact results. I heard that there is a NetBIOS API that can be used, but I am not familiar with this API. ...

Android Socket connection refused

I am trying to open a Socket on Android but everytime I try I keep getting connection refused error no matter what way I try. The error happens on the following line of code where I try to create the connection. Socket socket = new Socket(getLocalIpAddressString(), 8008); The following is the method I use to get the local ip addr...

How to get the incoming ssh/telnets clients local IP address from a shell script or C

I need a way to obtain a local (not WAN) address of an incoming telnet or ssh session using a shell script or C. ...

How to detemine which network interface (ip address) will be used to send a packet to a specific ip address?

I'm writing a SIP stack, and I need to insert an ip address in the message. This address needs to be the one used for sending the message. I know the destination IP and need to determine the NIC (its address) that will be used to send the message.... ...

What is the total amount of public IPv4 addresses?

Yes, I am needing to know what the total number possible IPs in the public IPv4 space. I'm not sure where to even get a neat list of all the IP address ranges, so could someone point me to a resource to calculate this myself or calculate the total number of IPs for me? Also, by Public IPs I mean not counting reserved or private-range...

How to bind an ip address to telnetlib in Python

The code below binds an ip address to urllib, urllib2, etc. import socket true_socket = socket.socket def bound_socket(*a, **k): sock = true_socket(*a, **k) sock.bind((sourceIP, 0)) return sock socket.socket = bound_socket Is it also able to bind an ip address to telnetlib? ...