Hello Fernando,

As far of my knowledge, NS_AF_NONE is used for broadcasting messages, and 
NS_AS_INET is used for routing protocols implemented as Internet protocol.

Salam,
Ahmad



> Date: Mon, 25 Aug 2008 11:17:02 -0300
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: [ns] NS_AF_INET - ?
> 
> 
> I was implementing a protocol, just for test purposes, and it wasn't
> really working. Then, after observing some other codes, I saw that some of
> them had this "cmh->addr_type()= NS_AF_INET;" somewhere, so I tried to
> make the same in my code. And it worked ! I didn't understand why, can
> someone explain me what is this NS_AF_INET addr_type?
> 
> 
> Here is part of my code, which sends and answers packets:
> 
>    if (hdr->type==1) {
>       printf("received..(%d,%d)\n",cmh->prev_hop_,hdr->id);
>       // it was a broadcast.. I need to answer it
>       hdr->type=0;
>       cmh->next_hop() = cmh->prev_hop_;
>       cmh->prev_hop_ = myaddr;
>       cmh->addr_type()= NS_AF_INET;
>       cmh->direction()= hdr_cmn::DOWN;
>       send(pkt,0);
>       return;
>    } else {
>       printf("sending..[%d]\n",myaddr);
>       hdr->type=1;
>       cmh->next_hop() = IP_BROADCAST;
>       cmh->addr_type()= NS_AF_INET;
>       cmh->prev_hop_ = myaddr;
>       cmh->direction()= hdr_cmn::DOWN;
>       send(pkt,0);
>       return;
>    }
> 
> 
> 
> 
> 
> Thx, Fernando.
> 

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE

Reply via email to