Re: Aliasing the loopback.

From: P.T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: 01/07/04


Date: Wed, 07 Jan 2004 09:40:18 GMT

William D. Tallman <wtallman@olypen.com> wrote:
> ptb@oboe.it.uc3m.es (P.T. Breuer) wrote in message news:<nn1ftb.4aa.ln@news.it.uc3m.es>...
> > Anything. Packets aimed at those addresses will never ever leave your
> > kernel. And obviously, they will never enter it ... hmm, I guess you
> > could try forming a packet that says it is aimed at 127.0.0.1 and
> > physically putting it on the LAN. I'm not sure what a NIC would do if
> > it were configured to accept for 127.0.0.1 and saw such a packet
> > passing ... probably ignore it. The NICs must have all the rfcs in the
> > worls programmed into their firmware nowadays.

> How would you do this?

I'm not sure. There are libraries that help you to form packets to
order and put them out on whatever interface you like, but I've never
used anything like that.

> As far as my equipment goes, it'd take a
> computer to create the packet, and then it would go to the loopback
> directly. Dunno whether that's true of windows, I'll have to try that
> next time I get on the windows machine.

> I've no idea what sort of info the firmware on NICs have, but AFAIK,
> they basically talk MAC and little else.

Despite what other contributions to this thread say, I am pretty sure
that they have been more intelligent than that for a good long time.
Many years. In other words, they include some router functionality.

Hmmm ... a quick scan of the 8139too.c code shows:

/* Set or clear the multicast filter for this adaptor.
   This routine is not state sensitive and need not be SMP locked. */

   static void __set_rx_mode (struct net_device *dev)
   {
   ...
       } else if ((dev->mc_count > multicast_filter_limit)
              || (dev->flags & IFF_ALLMULTI)) {
           /* Too many to filter perfectly * -- accept all multicasts. */
           rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
           mc_filter[1] = mc_filter[0] = 0xffffffff;
       }
   ...

But nothing else showing what I vaguely recall .. let's try the old
3c509 code ...

Yep.

  /*
   * Set or clear the multicast filter for this adaptor.
   */
  static void
  set_multicast_list(struct net_device *dev)
  {

  ...

and that old card doesn't have a "mc_filter" array, which is what I
recall. The 8139 has a size two array! Tiny! I'm prety sure the
eepro100 has a bigger array ...

Anyway, perhaps I should have said:

  "explain IP aliases and/or multicast" (if you think that NICs don't
  understand IP to some extent).

> According to the OSI/IP
> model, they are at the data-link level at best, and just pass on what
> they're given from the network level. I've still got lots to learn
> about this stuff.

Peter



Relevant Pages

  • Re: UDP Sending an array possible?
    ... Is it possible to send an array instead of a straight line of text? ... i can make a huge string and send it and then ... Is the receiving application a .NET application? ... Sockets break data up into packets, ...
    (microsoft.public.dotnet.languages.vb)
  • Whats the best way to accumulate data?
    ... I have an application that receives data (floats) via a socket. ... Each packet has a header telling me how ... So I create an array with this many elements ... Sometimes the data is split between multiple packets. ...
    (microsoft.public.dotnet.languages.csharp)
  • a question about socket and arrays !
    ... if I copy the array byte after byte using a for loop like ... Question about socket: ... I am going to send packets to the server using lots of threads(one ... or just one socket listening on all coming packets? ...
    (comp.lang.java.help)
  • Re: Convert byte stream to user defined type/class
    ... This data is broken into packets of bytes before being ... The network layer is the ... your app just read X amount of data. ... > individual packets of bytes into an array of say doubles? ...
    (microsoft.public.dotnet.languages.csharp)