* Must every packet have a creating socket? (was Re: Does a forwarded packet has a local socket with it?)
@ 2005-04-20 17:29 Park Lee
2005-04-21 1:20 ` Rick Jones
0 siblings, 1 reply; 4+ messages in thread
From: Park Lee @ 2005-04-20 17:29 UTC (permalink / raw)
To: Neil Horman; +Cc: jamal, linux-net, netdev
On Tue, 19 Apr 2005 at 08:26, Neil Horman wrote:
> Not sure what your asking here. Asking "Does these
> two sockets belong to local socket?" is a pretty
> meaningless question, as the terminology is
> nonsensical. All sockets have a protocol associated
> with them (except raw sockets, but thats another
> topic). When you create a socket you associate it
> with a protocol family (AF_INET, AF_INET6,
> AF_NETLINK, AF_APPLETALK, etc),
> a connection type (SOCK_STREAM for connection
> oriented protocols, SOCK_DGRAM for connection-less
> protocols), and a protocol (IPPROTO_TCP,
> IPPROTO_UDP, etc). Depending on the family, type
> and protocol you select, you can talk to different
> systems/services.
>
> Does that answer your question?
Thanks a lot.
Can I think that every packet (e.g. IP packet) must
have a corresponding creating socket? (i.e. Must every
packet be created by a socket?)
Is there any other way to originate a packet?
Thank you.
Best Regards,
Park Lee
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Must every packet have a creating socket? (was Re: Does a forwarded packet has a local socket with it?)
2005-04-20 17:29 Must every packet have a creating socket? (was Re: Does a forwarded packet has a local socket with it?) Park Lee
@ 2005-04-21 1:20 ` Rick Jones
2005-04-22 11:39 ` Must every packet have a creating socket? Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Rick Jones @ 2005-04-21 1:20 UTC (permalink / raw)
To: Park Lee; +Cc: Neil Horman, jamal, linux-net, netdev
> Can I think that every packet (e.g. IP packet) must
> have a corresponding creating socket? (i.e. Must every
> packet be created by a socket?)
No. ICMP messages come to mind - although I _suppose_ that since those are in
response to other traffic, you could claim it was in response to something sent
from a "socket" or "endpoint" - depends on how far away you consider it to still
be from a socket.
> Is there any other way to originate a packet?
>
> Thank you.
>
> Best Regards,
> Park Lee
>
>
>
> __________________________________
> Do you Yahoo!?
> Make Yahoo! your home page
> http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Must every packet have a creating socket?
2005-04-21 1:20 ` Rick Jones
@ 2005-04-22 11:39 ` Andi Kleen
0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2005-04-22 11:39 UTC (permalink / raw)
To: Rick Jones; +Cc: Neil Horman, jamal, linux-net, netdev
Rick Jones <rick.jones2@hp.com> writes:
>> Can I think that every packet (e.g. IP packet) must
>> have a corresponding creating socket? (i.e. Must every
>> packet be created by a socket?)
>
> No. ICMP messages come to mind - although I _suppose_ that since
> those are in response to other traffic, you could claim it was in
> response to something sent from a "socket" or "endpoint" - depends on
> how far away you consider it to still be from a socket.
Actually Linux has kernel private sockets for ICMP.
Very old Linux didnt, but it required ugly special cases
in the transmit path, so it was removed.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Must every packet have a creating socket? (was Re: Does a forwarded packet has a local socket with it?)
@ 2005-04-21 13:05 Park Lee
0 siblings, 0 replies; 4+ messages in thread
From: Park Lee @ 2005-04-21 13:05 UTC (permalink / raw)
To: Rick Jones; +Cc: Neil Horman, Masoud Sharbiani, jamal, linux-net, netdev
On Wed, 20 Apr 2005 at 18:20, Rick Jones wrote:
>> On Wed, 20 Apr 2005 at 10:29, Park Lee wrote:
>> Can I think that every packet (e.g. IP packet) must
>> have a corresponding creating socket? (i.e. Must
>> every packet be created by a socket?)
>
> No. ICMP messages come to mind - although I
> _suppose_ that since those are in response to other
> traffic, you could claim it was in response to
> something sent from a "socket" or "endpoint" -
> depends on how far away you consider it to still
> be from a socket.
But as I know, The Linux network component creates
two special purpose sockets for use by the AF_INET
protocol family. The tcp socket is used to send resets
when a TCP packet is rejected, since there may be no
local socket corresponding to the packet. The icmp
socket is used to send ICMP messages.
Then, ICMP echo replies are asociated with the
special kernel socket.
So, I still think that every packet (e.g. IP
packet) must have a corresponding creating socket.
Am I right?
Thank you.
Best Regards,
Park Lee
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-04-22 11:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20 17:29 Must every packet have a creating socket? (was Re: Does a forwarded packet has a local socket with it?) Park Lee
2005-04-21 1:20 ` Rick Jones
2005-04-22 11:39 ` Must every packet have a creating socket? Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2005-04-21 13:05 Must every packet have a creating socket? (was Re: Does a forwarded packet has a local socket with it?) Park Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).