All of lore.kernel.org
 help / color / mirror / Atom feed
* struct ip vs struct iphdr
@ 2017-05-04 16:42 Oleg
  2017-05-04 16:52 ` Sowmini Varadhan
  2017-05-04 17:08 ` Girish Moodalbail
  0 siblings, 2 replies; 5+ messages in thread
From: Oleg @ 2017-05-04 16:42 UTC (permalink / raw)
  To: netdev

  Hi, all.

It seems struct ip and struct iphdr are similar: struct ip, despite of
it name, doesn't contain anything but ip header.

So, my noob question, what is the difference between them?

Thanks.

-- 
Олег Неманов (Oleg Nemanov)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct ip vs struct iphdr
  2017-05-04 16:42 struct ip vs struct iphdr Oleg
@ 2017-05-04 16:52 ` Sowmini Varadhan
  2017-05-05  7:48   ` Oleg
  2017-05-04 17:08 ` Girish Moodalbail
  1 sibling, 1 reply; 5+ messages in thread
From: Sowmini Varadhan @ 2017-05-04 16:52 UTC (permalink / raw)
  To: Oleg; +Cc: netdev

On (05/04/17 19:42), Oleg wrote:
> 
>   Hi, all.
> 
> It seems struct ip and struct iphdr are similar: struct ip, despite of
> it name, doesn't contain anything but ip header.
> 
> So, my noob question, what is the difference between them?
> 
> Thanks.

BSD vs linux?

struct ip is a BSD-ism, intended to be used if you were porting
some BSD app.

--Sowmini

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct ip vs struct iphdr
  2017-05-04 16:42 struct ip vs struct iphdr Oleg
  2017-05-04 16:52 ` Sowmini Varadhan
@ 2017-05-04 17:08 ` Girish Moodalbail
  2017-05-05  8:02   ` Oleg
  1 sibling, 1 reply; 5+ messages in thread
From: Girish Moodalbail @ 2017-05-04 17:08 UTC (permalink / raw)
  To: Oleg, netdev

On 5/4/17 9:42 AM, Oleg wrote:
>   Hi, all.
>
> It seems struct ip and struct iphdr are similar: struct ip, despite of
> it name, doesn't contain anything but ip header.
>
> So, my noob question, what is the difference between them?

Also, see this:

http://stackoverflow.com/questions/42840636/difference-between-struct-ip-and-struct-iphdr

>
> Thanks.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct ip vs struct iphdr
  2017-05-04 16:52 ` Sowmini Varadhan
@ 2017-05-05  7:48   ` Oleg
  0 siblings, 0 replies; 5+ messages in thread
From: Oleg @ 2017-05-05  7:48 UTC (permalink / raw)
  To: Sowmini Varadhan; +Cc: netdev

On Thu, May 04, 2017 at 12:52:48PM -0400, Sowmini Varadhan wrote:
> BSD vs linux?
> 
> struct ip is a BSD-ism, intended to be used if you were porting
> some BSD app.

  Thanks!

-- 
Олег Неманов (Oleg Nemanov)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: struct ip vs struct iphdr
  2017-05-04 17:08 ` Girish Moodalbail
@ 2017-05-05  8:02   ` Oleg
  0 siblings, 0 replies; 5+ messages in thread
From: Oleg @ 2017-05-05  8:02 UTC (permalink / raw)
  To: Girish Moodalbail; +Cc: netdev

On Thu, May 04, 2017 at 10:08:46AM -0700, Girish Moodalbail wrote:
> Also, see this:
> 
> http://stackoverflow.com/questions/42840636/difference-between-struct-ip-and-struct-iphdr

  I saw this. But the answer say that struct ip and struct iphdr defined in
different places. However i see struct iphdr together with struct ip in
my netinet/ip.h. So, i thought that this answer may be inexact or incorrect.

  Thanks!

-- 
Олег Неманов (Oleg Nemanov)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-05  8:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 16:42 struct ip vs struct iphdr Oleg
2017-05-04 16:52 ` Sowmini Varadhan
2017-05-05  7:48   ` Oleg
2017-05-04 17:08 ` Girish Moodalbail
2017-05-05  8:02   ` Oleg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.