Lecture16 - Thursday, May 22 Homework #4 is due Lab #5 is...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Thursday, May 22 Homework #4 is due Questions? Solutions will be posted today Lab #5 is posted Due Friday, May 30 Lab schedule is changed!! Program #2 is posted Due Thursday, June 5 (2 weeks from today!) Partnership registration due Tuesday (5/27)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Summer Employment Linux kernel development Device drivers, etc Up to 40 hours per week See me if you’re interested
Background image of page 2
3 Today's Topics Notes on Program #2 More ICMP DHCP IPv6 Intro to the Link Layer
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Program #2 DNS query requires sending both character and numeric  data Don’t try to use C string functions on numeric data Keep count of actual number of bytes Some numeric data is 2-byte, 4-byte Some numeric values must be stored as a single byte Use buff[i] = (char)x; And … (as if that were not bad enough) …
Background image of page 4
5 Byte-ordering In all modern computer architectures, strings  are stored in  contiguous memory addresses in byte (character) order However … storage of numeric values  is architecture dependent 16-bit integer (2 bytes) 32-bit integer (4 bytes) etc. Different architectures store numeric values in different byte  order
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Big-endian, Little-endian Big-endian Numeric (multi-byte) values are stored in "normal" byte order most significant byte first Example: Decimal 1523 = 05F3 (hex) Big-endian  byte order is  05  F3 Little-endian Numeric (multi-byte) values are stored in "reverse" byte order least significant byte first Example: Decimal 1523 = 05F3 (hex) Little-endian  byte order is  F3  05 NOTE: this refers to byte-order, NOT to the order of bits within the  bytes.
Background image of page 6
7 Big-endian, Little-endian Example: 32-bit dotted-decimal 128.193.35.203 = 80C123CB  (hex) Big-endian  byte order is  80  C1  23  CB Little-endian  byte order is  CB  23 C1  80
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Big-endian, Little-endian Intel  architectures use  little-endian Sparc, Solaris  (and other) architectures use  big-endian Problem with communication among various architectures.
Background image of page 8
9 Network communication Data sent over a network is a sequence of bytes (characters,  integers, etc.) Network order is  always  Big-endian Linux provides some functions to convert host order    network order. #include <netinet/in.h> ntohs, htons : 16-bit network-to-host and host-to-network ntohl, htonl :  32-bit network-to-host and host-to-network inet_ntoa :  converts address  in network byte order  to a string   in dotted-decimal notation. 
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Questions on Program #2?
Background image of page 10
11 Informational messages Echo request/reply Sent to ICMP software on any computer In response to a 
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 58

Lecture16 - Thursday, May 22 Homework #4 is due Lab #5 is...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online