Re: [tcpdump-workers] about struct in_addr

2006-05-08 Thread Lan Qing
So,never mind it is a structure or a typedef,it point to the same memory address,to use a structure only for it's historical reason like Guy Harris said? On 5/7/06, Sebastien Raveau <[EMAIL PROTECTED]> wrote: On Saturday 06 May 2006 06:18, Lan Qing wrote: > the struct in_addr have only one vari

Re: [tcpdump-workers] about struct in_addr

2006-05-06 Thread Sebastien Raveau
On Saturday 06 May 2006 06:18, Lan Qing wrote: > the struct in_addr have only one variable in it, is there any necessary to > define a struct like that? > why not use "typedef in_addr_t in_addr;" directly? POSIX (the standard for UNIX software) states that: "The header shall define the in_addr s

Re: [tcpdump-workers] about struct in_addr

2006-05-05 Thread Guy Harris
Lan Qing wrote: hello, I read the fllowing words in the c header file I.e., the header that came with your OS, not the header that comes with tcpdump? /* Internet address. */ typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; };" the struct in_addr have only one variable

Re: [tcpdump-workers] about struct in_addr

2006-05-05 Thread Hannes Gredler
what is the point ? - the storage space is the same ... Lan Qing wrote: hello, I read the fllowing words in the c header file " /* Internet address. */ typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; };" the struct in_addr have only one variable in it, is there any necessar

[tcpdump-workers] about struct in_addr

2006-05-05 Thread Lan Qing
hello, I read the fllowing words in the c header file " /* Internet address. */ typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; };" the struct in_addr have only one variable in it, is there any necessary to define a struct like that? why not use "typedef in_addr_t in_addr;" d