LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   TCP/IP protocol stack query ?????? (https://www.linuxquestions.org/questions/linux-networking-3/tcp-ip-protocol-stack-query-573576/)

raklo 07-31-2007 12:49 AM

TCP/IP protocol stack query ??????
 
hi all,
i m confusd bout certain fields of IP header cud u solve them

1)wot wd be the fate of packet if TTL=0 ??

2)wot wd be the fate of packet if TTL=1 ??

3)If my packet is not fragmented,then is there any
use of Identification field in the IP header???

4) If i wanna add my own custom byte into the ip header
,wotz the least laborious way to do it???

regards

acid_kewpie 07-31-2007 01:04 AM

1) it'd be timed out as ttl expired

2) TTL is decremented to 0 as it moves to the next hop, then as 1).

3) no

4) edit the tcpip stack code on all affected systems i guess.

raklo 07-31-2007 01:13 AM

thanx a lot,for this upto the mark reply.
for the ans 2) that u gave.
does the TTL decrement at the sender level,or at the receipent level.i.e,is it
decremented and sent,or sent and then at the other side decremented????

for the ans 3) that u gave,
if my packet is not fragmented,if i fill identification field with random bits
then wud that make a difference???


for the ans 4) ,
do u think raw sockets will help me in anyway for my purpose???n also
at which layer r the sockets formed??

regards

raklo 07-31-2007 04:27 AM

also cd anyone tell me at which layer is TTL checked????

acid_kewpie 07-31-2007 07:09 AM

well for 2 i assume the ttl is decremented as it is sent on to the next hop, as if it were addressed for itself it wouldn't decrement.

for 3 and 4 i have no idea... read the tcp/ip standards and ttl is an IP attribute, so would be checked at the layer equivalent to IP. i'm sure you can find which one that is yourself.


All times are GMT -5. The time now is 04:29 AM.