























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This course is about introduction to network programming. Topics covered in this are direct link networks, packet switching, internetworking, end-to-end protocols, congestion control and resource, allocation, end-to-end data, applications. This lecture includes: Presentation, Formatting, Data, Compression, Application, Data, Encoding, Decoding, Floating, Point, Compiler, Layout, Structures
Typology: Slides
1 / 31
This page cannot be seen from the preview
Don't miss anything!
























2
3
5
Presentation Formatting
6
Difficulties
(126)
(34)
(17)
(2)
00000010
Big-endianLittle- endian
(2)
(17)
(34)
(126)
Low address
High address
0
0
111111
0 0
0 0 1
0 0
1
0 0
0
01
001
0 0
0 0 1
0 0
1
0 0
0
01
001
0 0 0
000 0
1
0
0 1 1 1 1 1 1
8
Taxonomy
N
x
N
solution)
9
Taxonomy (cont)
11
eXternal Data Representation
(XDR)
pointers)
12
#define MAXNAME 256;#define MAXLIST 100;struct item {
int
count;
char
name[MAXNAME];
int
list[MAXLIST];
**};bool_txdr_item(XDR xdrs, struct item ptr){
return(xdr_int(xdrs, &ptr->count) &&
xdr_string(xdrs, &ptr->name, MAXNAME) &&xdr_array(xdrs, &ptr->list, &ptr->count,
MAXLIST, sizeof(int), xdr_int));
}
Count
Name J
O
3
7
H
N
S
O
N
List
3
4 9 7
2 6 5
8 321
Example Code (XDR)
14
ASN.1 BER Representation
length
0
k
1
k containing
length
(a) (b)
15
Network Data Representation (NDR)
system
(architecture tag)
untagged
IntegrRep 0
4
8
16
24
31
FloatRep
CharRep
Extension 1
Extension 2
17
Compression Overview
18
Lossless Algorithms
3A2B1C4D
compression ratio)
(e.g. some images)
20
Dictionary-Based Methods
x
21
Image Compression
JPEG compression
DCT
Quantization
Encoding
Compressed
image