2372073 corvinaececmuedu assigned sta2cally my

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rk byte order htons: convert uint16_t from host to network byte order ntohl: convert uint32_t from network to host byte order ntohs: convert uint16_t from network to host byte order Carnegie Mellon Do[ed Decimal Nota8on By conven8on, each byte in a 32-bit IP address is represented by its decimal value and separated by a period IP address: 0x8002C2F2 = 128.2.194.242 Func8ons for conver8ng between binary IP addresses and do[ed decimal strings: inet_aton: doned decimal string IP address in network byte order inet_ntoa: IP address in network byte order doned decimal string "n" denotes network representa2on "a" denotes applica2on representa2on Carnegie Mellon IP Address Structure IP (V4) Address space divided into classes: 0 1 2 3 8 16 24 31 Class A 0 Net ID Host ID Class B 1 0 Net ID Host ID Class C 1 1 0 Net ID Host ID Class D 1 1 1 0 Mul2cast address Class E 1 1 1 1 Reserved for experiments Network ID Wri[en in form w.x.y.z/n n = number of bits in host address E.g., CMU wrinen as 128.2.0.0/16 Class B addre...
View Full Document

This note was uploaded on 04/06/2013 for the course ECE 18213 taught by Professor John during the Spring '13 term at Carnegie Mellon.

Ask a homework question - tutors are online