Questions tagged [inet]

INET Framework for OMNeT++ to simulate network communications.

INET Framework is an open-source OMNeT++ model suite for simulating wired, wireless and mobile networks.

INET contains models for the Internet stack (TCP, UDP, IPv4, IPv6, OSPF, BGP, etc.), wired and wireless link layer protocols (Ethernet, PPP, IEEE 802.11, etc), support for mobility, MANET protocols, DiffServ, MPLS with LDP and RSVP-TE signalling, several application models, and many other protocols and components.

620 questions
16
votes
5 answers

What does InetAddress.isSiteLocalAddress() actually mean?

Here is some code to determine the local host name that is supposed to work on a multi-homed box: /** * Work out the first local host name by iterating the network interfaces * * @return * @throws SocketException */ private String…
TiGz
  • 894
  • 2
  • 13
  • 21
15
votes
1 answer

Postgres Check if IP (inet) is IN a list of IP Ranges

I want to check if an IP exists in a range of ranges, eg: SELECT * FROM ip_address WHERE ip IN () Postgresql documentation states to use the << operator to check if an IP is contained within a single IP Range, eg: inet…
Eric Zhang
  • 672
  • 1
  • 4
  • 13
11
votes
2 answers

How to use LIKE on inet field in Postgres

I need to perform the following query: SELECT * FROM users WHERE ip LIKE '88.99.%'; The problem is that the inet datatype does not seems to support wildcards (at least not in the way I have utilized them in the preceding query). What I'd like to…
Aley
  • 8,540
  • 7
  • 43
  • 56
9
votes
1 answer

inet_aton similar function for IPv6

I am using inet_aton to convert IPv4 IP(216.12.207.142) to a string 3624718222. I use the following code for that: ip_dec = unpack('>L', inet_aton(ip))[0] Now I need to convert IPv6 ip 2001:23::207:142 to a similar string. It gives me error as it…
Sanket Lad
  • 351
  • 1
  • 5
  • 15
8
votes
1 answer

As IPV6 needs 128 bits(16 bytes) then why in postgres CIDR datatype has storage as 24 byte(8.1) and 19byte(9.1)?

i am working with ipv4 and ipv6 to store in postgres db. as ipv4 needs 32 bits(4byte) and ipv6 needs 128(16byte) bits.then why in postgres CIDR and INET datatype has the storage as 12 byte and 24 bytes respectively for IPV4 and IPV6(8.1). with…
Asha Koshti
  • 2,763
  • 4
  • 22
  • 30
7
votes
2 answers

Perl: How to get IO::Socket::INET timeout after X seconds?

I'm trying to connect to some host, using invalid port, and i want to get timeout after X seconds. How to do that ? My code: $sock = new IO::Socket::INET( PeerAddr => $_[0], PeerPort => $_[1], Proto => 'tcp', Timeout…
code2be
  • 1,358
  • 1
  • 10
  • 15
6
votes
1 answer

Avoid Rails converting PostgreSQL inet type to an IPAddr object?

I have a problem in my Rails project. In previous projects (not Rails) I just used the "inet" type in PostgreSQL to store an IP address with a subnet, something like this: 192.168.1.0/30 192.168.1.1/30 192.168.1.2/30 192.168.1.3/30 This was a…
user2699706
  • 160
  • 3
  • 11
6
votes
3 answers

Detecting HTTP close using inet

In my mochiweb application, I am using a long held HTTP request. I wanted to detect when the connection with the user died, and I figured out how to do that by doing: Socket = Req:get(socket), inet:setopts(Socket, [{active, once}]), receive …
jeffreyveon
  • 13,400
  • 18
  • 79
  • 129
5
votes
0 answers

How to detect collisions at receiver in OMNeT++ and INET Framework

I am trying to understand the behavior of Radio.cc (in inet/physicallayer/common/packetlevel/). In particular I want to know how it can detect collisions. I would expect something like: if(radio==IDLE and newFrame arrives){ radio = RECEIVING; …
rebrid
  • 430
  • 8
  • 27
5
votes
2 answers

How do I compare IP addresses in PHP as binary strings?

I am currently working with IPv4 and IPv6 addresses in a PHP based project, and I need to be able to compare two IPs to determine which one is a higher number. For example, that 192.168.1.9 is greater than 192.168.1.1. In order to do this, I…
Seth McCauley
  • 983
  • 11
  • 24
5
votes
5 answers

Inet Socket and Socket?

Can anybody tell me the difference between a INET Socket and any other socket? Is there a C# library that will allow one to work with INET Sockets? I've attempted to find what it is, but I haven't found anything very useful. I'm suspecting it's…
Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
5
votes
2 answers

Converting IP Address input by using inet_ntop() & inet_pton() (C PROGRAMMING)

i'm trying to convert an IP address that's inputted by a user so that I can perform some bitwise operations on it and a address already stored in a structure. My problem is however that when the IP address is converted back the output is always…
A CSc Student----
  • 97
  • 1
  • 2
  • 10
4
votes
1 answer

Perl IO::Socket::INET confusing "Invalid argument" error

Consider the following snippet of a Perl script: use IO::Socket; # ... my $sock = IO::Socket::INET->new( PeerAddr => $host, # e.g. "google.com" PeerPort => $port, # e.g. 80 Proto => 'tcp' ); die("no socket: $!") unless $sock; #…
maerics
  • 151,642
  • 46
  • 269
  • 291
4
votes
1 answer

Try to create new project with INET reference, got : "unexpected NAME, expecting $end" in .msg file

I created a project which contains my linklayer and simulation source code. This project has INET as the project reference. At build time, I got this error: Error: syntax error, unexpected NAME, expecting $end It comes from the message file (which…
4
votes
1 answer

Omnet++ OSPF Routing table metric

Question 1: I implemented ospf protocol in Omnet++. According to the topology, r1 can reach two different ways to r3 .I have set the upper path metric to 1 and lower path to 10. However, according to the OSPF protocol, it should not select the lower…
melek_3
  • 117
  • 1
  • 13
1
2 3
41 42