Network Programming and Protocol Stacks Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

flashcard set

Earn XP

Description and Tags

These flashcards cover the fundamental concepts of network protocols, the TCP/IP stack, and the sockets API in C as discussed in the lecture.

Last updated 12:36 AM on 6/18/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

17 Terms

1
New cards

What is a protocol in the context of communications?

A formal set of rules governing how data is exchanged between two entities, including the syntax of messages and the rules for actions to be taken on certain events.

2
New cards

What is the difference between connection-oriented and connectionless services?

Connection-oriented services involve establishing a connection, using it, and then releasing it (modeled after the telephone system). Connectionless services treat every message as independent, requiring a full destination address for each (modeled after the postal service).

3
New cards

How are reliable and unreliable services defined in networking?

A reliable service provider makes a best-effort attempt to communicate using retransmissions and acknowledgments. An unreliable service throws the message out onto the network without following up on whether it was received.

4
New cards

What is enveloping (or encapsulation) in a protocol stack?

The process where each layer treats data from the layer above as an opaque block and tacks on its own header (or footer) before passing it down. These headers are stripped off at the receiving end.

5
New cards

What are the specific names for messages at the TCP, UDP, IP, and Link layers?

TCP messages are segments, UDP messages are datagrams, IP messages are datagrams or packets, and Link layer messages are frames.

6
New cards

What is the size of an IPv4 address and how is it usually written?

3232 bits, typically written in dotted decimal notation consisting of four numbers, each corresponding to a single byte.

7
New cards

In the IP header, what four-bit field allows a system to distinguish between different versions of the protocol?

The version number field, which is the very first field in the header (e.g., 44 for IPv4).

8
New cards

What are the IP protocol numbers for TCP and UDP?

TCP is protocol 66 and UDP is protocol 1717.

9
New cards

What does MTU stand for and what is its typical value for Ethernet?

Maximum Transmission Unit; it is typically 1,5001,500 bytes.

10
New cards

What four components uniquely identify a TCP connection?

The combination of the source IP address, the source port number, the destination IP address, and the destination port number.

11
New cards

Why is TCP referred to as a "byte stream" protocol?

Because it provides a continuous stream of bytes like a pipe, where message boundaries are not preserved between the sender and the receiver.

12
New cards

What are well-known ports and ephemeral ports?

Well-known ports are standard ports (00 to 10231023) associated with specific services (like port 2222 for SSH). Ephemeral ports are short-lived, high-numbered ports (4915249152 to 6553565535) typically used by clients to associate with their end of a connection.

13
New cards

Which transport protocol is preferred for real-time video streaming or games, and why?

UDP; it avoids the slowdown of retransmissions and acknowledgments, allowing for faster communication even if some data is lost or corrupted.

14
New cards

What is the purpose of the socket system call accept()?

It is used by a server to accept a connection request, returning a new file descriptor for the connected socket while the original file descriptor remains for listening.

15
New cards

What is the function of getaddrinfo() in C network programming?

It translates hostnames (e.g., "uq.edu.au") and service names (e.g., "http") into IP addresses and port numbers, providing a linked list of addrinfo structures.

16
New cards

What is the loopback address for the local machine in IPv4?

127.0.0.1127.0.0.1, often associated with the hostname "localhost".

17
New cards

What byte ordering is used for network addresses?

Big Endian.