Advanced Linux study notes, lectures and videos: http://www.haifux.org/
Wonderful topics for users or programmers interested in Linux networking data structure, routing subsystems, IPsec, bridging, and IPv6.
Have fun!
Network, Linux, Security, Code and Learning Games
Advanced Linux study notes, lectures and videos: http://www.haifux.org/
Wonderful topics for users or programmers interested in Linux networking data structure, routing subsystems, IPsec, bridging, and IPv6.
Have fun!
" Hi I am Tux Lets be "special friends!" - LOL
40 chapters of Free Linux training tutorial videos:
http://www.tomlinux.ca
Illustrated Linux security tips:
http://tuxtraining.com/category/security
Enjoy!
Free Linux Course live CD with movies and network commands for those starting out in Linux.
The TCP/IP protocol is "Big Endian"processing. How does a "little endian" processor read the packets sent from "Big Endian"?
Little Endian reads CPU register value (backwards or bottom-to-top)
Big Endian reads CPU register value (forwards or top-to-botom)
This means Byte Order "functions" are needed to switch (convert) between big endian and little endian.
Linux, BSD and Solaris use the following functions:
hton = host-to-network
ntoh = network-to-host
s = short = 16 bit integer
l = long = 32 bit integer
ll= double = 64 bit integer
Function Code Sample:
htons()
htonl()
htonll()
ntohs()
ntohl()
ntohll()
This means if the routing processor is "Big endian" and the sending or receiving processing code is "Little Endian" The above byte order "functions" are required to switch (convert) between Big Endian and Little Endian. If no Byte Order "Function" is present then it will arrive as unreadable garbage to the processor.
Hope you enjoyed this Linux Network Code snack!