ipv4

What is the difference between 0.0.0.0 and 255.255.255.255 in IPv4?

I've heard some people say the IPv4 broadcast address is 0.0.0.0 and others say it is 255.255.255.255... would someone explain the real-world difference? ...

How do I choose a multicast address for my application's use?

Hi, How should I choose an IPv4 multicast address for my application's use? I may need more than one (a whole range perhaps ultimately) but just want to avoid conflicts with other applications. Packets will be entirely contained within an administrative domain, probably a LAN If several independent instances of my application are in ...

Why does gethostbyaddr(gethostname()) return my IPv6 IP?

I'm working on making a simple server application with python, and I'm trying to get the IP to bind the listening socket to. An example I looked at uses this: HOST = gethostbyaddr(gethostname()) With a little more processing after this, it should give me just the host IP as a string. This should return the IPv4 address. But when I ru...

How to convert an IPv4 address into a integer in C#?

I was going to attempt to write this function myself but I thought that someone on SO might know the answer :) I'm basically looking for a function that will convert a standard IPv4 address into an Integer. Bonus points available for a function that will do the opposite. Solution should be in C#.net. ...

ipv4.fiddler, how does it work?

I'm curious as to how fiddler is able to capture traffic when you use the URL ipv4.fiddler. Is ipv4 a special domain that resolves local and fiddler just registers with http.sys to proxy the call? Any insight would be great. ...

IPv6 address ranges

Following on from this post I am interested in searching IPv6 address ranges. Under IPv4 I would be able to determine the start and end IP addresses provided by an ISP and using those integer values as range bounds quickly search a DataBase to see if any entries in the DB fell into that range. How will this be impacted by IPv6? Will IS...

is ipv6 backward compatable with ipv4?

I've got a little udp example program written using ipv4. If I alter the code to ipv6 would I still be able to communicate with anyone using the listener with an ipv4 address? I was looking at porting examples at http://ou800doc.caldera.com/en/SDK_netapi/sockC.PortIPv4appIPv6.html I'm not sure if simply altering the code would ensure ...

Get IPv4 addresses from Dns.GetHostEntry()

I've got some code here that works great on IPv4 machines, but on our build server (an IPv6) it fails. In a nutshell: IPHostEntry ipHostEntry = Dns.GetHostEntry(string.Empty); The documentation for GetHostEntry says that passing in string.Empty will get you the IPv4 address of the localhost. This is what I want. The problem is that...

Functions to manipulate IPv4 addresses in C#?

Given a IPv4 address in the form of a string (ex. "10.171.24.69") and a netmask (ex. "255.255.255.128" or "25" for number of bits in network part) I need to compute the broadcast address, which may be by either zeroing or one-ing the bits in the host part (depending on the IPUseZeroBroadcast property which I can query via WMI). I'm exam...

Resources to get started with IPv4/IPv6 basics and development

I'm looking for resources and book which one can use to get started with IPv4 and IPv6 network development. The most relevant book I've came up so far is "Unix Network Programming, Volume 1: The Sockets Networking API (3rd Edition)" which covers both protocols but apart from that I did not find very much. The information I'm looking fo...

What is the largest Safe UDP Packet Size on the Internet.

I've read a number of articles about UDP packet sizes but have been unable to come to a conclusion on whats correct. A number of services restrict the largest UDP packet to 512 bytes (like dns) Given the minimum MTU on the internet is 576 , and the size of the IPv4 header is 20 bytes, and the UDP header 8 bytes. This leaves 548 bytes...

Geolocation with IPv6?

I'm working on an IP geolocation library that uses the first three octets of an IPv4 address to determine a user's country, city, lat, lon, etc. Works like a charm. But it doesn't handle IPv6 addresses, and I'd like it to do so. Is there any way to transform an IPv6 address to get the equivalent of the first three octets of an IPv4 add...

C# server that supports IPv6 and IPv4 on the same port

Is it possible to have a Socket that listens and accepts both IPv6 and IPv4 clients? I used a IPv6 socket in C# hoping that it would automatically be backwards compatible but IPv4 clients cause an invalid ip address exception. ...

How to check if someone connected via IPv6 / IPv4

Hi there, I want to check via php if someone connects to my site via IPv4 or IPv6. The client address can be found in $_SERVER["REMOTE_ADDR"] but how to check if it's IPv4 or IPv6 ? Thank you for your time Andre ...

What are the possible return values for $_SERVER['REMOTE_ADDR'];?

In writing a login module, I want to log IP's as an additional measure for verifying who's on the other side is still the same person on the other side. I'm using $_SERVER['REMOTE_ADDR'] as one (of many) ways to get the remote machine's IP address. Aside from an IPv4 or IPv6 address, are there any other values i should expect this to r...

how to force python httplib library to use only A requests

The problem is that urllib using httplib is querying fro AAAA records what i would like to avoid. Is there a nice way to do that? >>> import socket >>> socket.gethostbyname('www.python.org') '82.94.164.162' 21:52:37.302028 IP 192.168.0.9.44992 > 192.168.0.1.53: 27463+ A? www.python.org. (32) 21:52:37.312031 IP 192.168.0.1.53 > 192.168...

How to support both IPv4 and IPv6 connections

Hello, I'm currently working on a UDP socket application and I need to build in support so that IPV4 and IPV6 connections can send packets to a server. I was hoping that someone could help me out and point me in the right direction; the majority of the documentation that I found was not complete. It'd also be helpful if you could poin...

get local IPv4 of computer using VB.net

I'm trying to get the ip address of my local PC, and one one of my other PCs it gets the v4 address fine, but on this one the code: Dns.GetHostEntry(Dns.GetHostName).AddressList(0).ToString() returns what I guess is a IPv6 address: fe80::9c09:e2e:4736:4c62%11 How do I get the IPv4 address? ...

Private Network (as in IPv4) question

I am working on an embedded TCP/IP4 stack and HTTP/SNMP/SMTP stuff. It functionally works but I want to make it work faster on LAN. Because of the Nagle's Algorithm and the delayed TCP-ACK, The HTTP application seems to work slow even on LAN. As can be seen on http://en.wikipedia.org/wiki/IPv4#Private_networks , There are 3 different Pr...

HttpContext IP Problem

Hi, I have a problem when I use HttpContext.Current.Request.UserHostAddress, some times returns "192.168.0.17" (IPv4) and some times returns "fe80::99be:a05d:7938:1c30%8" (IPv6), calling from the same computer and navigator. What I do to return always IPv4? ...