At the time of installing my Network adapter I need to assign an IP address.
But the machine might have more than 1 adapter already installed. How do I
figure out that I am not giving the same IP as that of the already installed
adapters. For WinMe and 98 the IP address assigned by DHCP is not stored in
registry. The other adapters use DHCP to get their IP, while my adapter uses
static IP.
Thanks
Daniel
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
On w2k and (I believe) 98 you can use uSoft-s APIPA to do just that.
They have a reserved class B address space, and they pick an unique address
in that range, via some heuristic guessing, and verifying / reselecting the
address
if a collision is detected via ARP.
For NT, I am afraid this is much harder. The publicly available
raw socket facilities appear to be broken on NT. I would be very happy to
be proven wrong on this count.
Raw sockets seem to be working OK on w2k.
(See Microsoft Platform SDK\Samples\NetDS\WinSock\iphdrinc directory for an
example).
Given a working raw sockets facility, you can roll your own ARP packets.
cheers
/sG
-----Original Message-----
From: Daniel Pradeep [mailto:xxxxx@broadlogic.com]
Sent: Tuesday, February 06, 2001 1:25 PM
To: NT Developers Interest List
Subject: [ntdev] Detect IP address duplication
At the time of installing my Network adapter I need to assign an IP address.
But the machine might have more than 1 adapter already installed. How do I
figure out that I am not giving the same IP as that of the already installed
adapters. For WinMe and 98 the IP address assigned by DHCP is not stored in
registry. The other adapters use DHCP to get their IP, while my adapter uses
static IP.
Thanks
Daniel
You are currently subscribed to ntdev as: xxxxx@networkengines.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> Given a working raw sockets facility, you can roll your own ARP packets.
Not possible. ARP is not IP - it is another Ethernet type.
Raw sockets are OK for stuff like OSPF Hello protocol - but for ARP, one
will need packet sockets which are not implemented on NT at all.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
I am taking about using the IP_HDRINC socket option.
ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL, (char *)&bOpt, sizeof(bOpt));
I tell the IP stack NOT to tag on an IP header, because presumably my app
rolls its own. Given that, I can roll any header I want, including an
ARP header.
Am I missing anything?
/sG
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, February 06, 2001 3:25 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Detect IP address duplication
Given a working raw sockets facility, you can roll your own ARP packets.
Not possible. ARP is not IP - it is another Ethernet type.
Raw sockets are OK for stuff like OSPF Hello protocol - but for ARP, one
will need packet sockets which are not implemented on NT at all.
Max
You are currently subscribed to ntdev as: xxxxx@networkengines.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> I tell the IP stack NOT to tag on an IP header, because presumably my app
rolls its own. Given that, I can roll any header I want, including an
ARP header.
Wrong. ARP is NOT IP. It uses other Ethernet part of the header - not the
same as IP uses.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are talking about the “type” field being 806 vs 800 in the RFC-894
style Ethernet header, yes?
I am thinking, for RFC 1042 style encapsulation (a.k.a IEEE 802.2/802.3)
the type field is in the payload, not in the MAC header.
I should really go and try this…
cheers,
/sG
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Thursday, February 08, 2001 12:25 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Detect IP address duplication
I tell the IP stack NOT to tag on an IP header, because presumably my app
rolls its own. Given that, I can roll any header I want, including an
ARP header.
Wrong. ARP is NOT IP. It uses other Ethernet part of the header - not the
same as IP uses.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> You are talking about the “type” field being 806 vs 800 in the RFC-894
style Ethernet header, yes?
I am thinking, for RFC 1042 style encapsulation (a.k.a IEEE 802.2/802.3)
the type field is in the payload, not in the MAC header.
I don’t think you can govern the Ethernet header encapsulation having a raw
IP socket.
The Ethernet part of the header (inlcuding the protocol ID) will be formed
automatically by IP and you will not be able to influence this. You will
only be able to form the IP header manually, not the Ethernet header.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com