2004-10-01 02:41:39

by cranium2003

[permalink] [raw]
Subject: Plzzz help me

Hello,
I want to know is there any way in linux kernel by
which i can come to know that the outgoing packet is
having destination address is of host not of router?
I want to send different data to host/router depending
on dest. address.

regards,
cranium.



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail


2004-10-01 19:02:15

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Plzzz help me

On Thu, 30 Sep 2004 19:41:36 PDT, cranium2003 said:
> Hello,
> I want to know is there any way in linux kernel by
> which i can come to know that the outgoing packet is
> having destination address is of host not of router?
> I want to send different data to host/router depending
> on dest. address.

What if the router is a host as well? This is quite possible
if the router is a unix/linux box with more than one network
interface.

What problem are you trying to solve by sending different data?


Attachments:
(No filename) (226.00 B)

2004-10-01 20:15:51

by Ryan Cumming

[permalink] [raw]
Subject: Re: Plzzz help me

On Thursday 30 September 2004 19:41, cranium2003 wrote:
> Hello,
> I want to know is there any way in linux kernel by
> which i can come to know that the outgoing packet is
> having destination address is of host not of router?
> I want to send different data to host/router depending
> on dest. address.

By definition, only hosts have IP addresses. Any router that has an IP address
is also a host.

-Ryan


Attachments:
(No filename) (410.00 B)
(No filename) (189.00 B)
Download all attachments

2004-10-01 20:41:07

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Plzzz help me

On Fri, 01 Oct 2004 13:11:18 PDT, Ryan Cumming said:

> By definition, only hosts have IP addresses. Any router that has an IP address
> is also a host.

Very true - if it's a L3 router, it needs that IP address so you have something
to use as a 'next hop' when you try to send to it. If it doesn't have an IP
address, it's a L2 switch/hub and you pretty much *don't* want to talk to it
at all (except to an IP set up as a "management" address, but then you're
talking to it as a host, of course)...

I *think* cranium2003 wanted to do different things depending on whether
the 'next hop addr == dest addr', but I'm failing to see any cases where
you'd want to do that....


Attachments:
(No filename) (226.00 B)