McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface.

Slides:



Advertisements
Similar presentations
Chapter 10 IPv4 and IPv6 Interoperability. contents Introduction IPv4 Client, IPv6 Server IPv6 Client, IPv4 Server IPv6 Address Testing Macros IPV6_ADDRFORM.
Advertisements

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)
Chapter 14 Application Layer and Client-Server Model.
Data Communications and Networking (Third Edition)
Outline  Introduction to Application Layer  Peer-to-peer paradigm  Client-server paradigm  Domain Name System (DNS)  Flat-naming vs hierarchical-naming.
Networks: TCP/IP Socket Calls1 Elementary TCP Sockets Chapter 4 UNIX Network Programming Vol. 1, Second Ed. Stevens.
Elementary TCP Sockets Chapter 4 UNIX Network Programming Vol. 1, Second Ed. Stevens.
Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write) Receive.
Socket Programming.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
EECS122 Communications Networks Socket Programming January 30th, 2003 Jörn Altmann.
1 Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write)
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 26 IP over ATM.
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 20 File Transfer Protocol (FTP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 24 TCP/IP.
Process-to-Process Delivery:
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 4 IP Addressing.
Operating Systems Chapter 9 Distributed Communication.
Socket Programming. Introduction Sockets are a protocol independent method of creating a connection between processes. Sockets can be either – Connection.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 2 The OSI Model and TCP/IP Protocol Suite.
Chapter 23 TCP/IP Overview Network Layer Transport Layer Application Layer WCB/McGraw-Hill  The McGraw-Hill Companies, Inc., 1998.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 25 TCP/IP Protocol Suite: Part 2, Application Layer.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 27 Mobile IP.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Chapter 2 OSI Model and TCP/IP
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 19 TELNET and Rlogin.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 3 Transport Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface
Sockets API Overview Sockets with UDP Sockets with TCP Fast Sockets (Fast UDP) IP Multicasting.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 12 Transmission Control Protocol (TCP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Transmission Control Protocol (TCP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 22 Transport Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 21 Trivial File Transfer Protocol (TFTP)
Chapter 2 Applications and Layered Architectures Sockets.
Overview of TCP/IP protocols –Application layer (telnet, ssh, http, ftp, etc) The things that we use daily. –Transport layer (TCP, UDP) Allows processes.
Position of application layer. Application layer duties.
Prepared by: Azara Prakash L.. Contents:-  Data Transmission  Introduction  Socket Description  Data Flow Diagram  Module Design Specification.
Introduction to Socket
Chapter 27 Socket API Interface The interface between an application program and the communication protocols in an operating system is known as the Application.
Client/Server Socket Programming Project
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.
Socket Programming.
The McGraw- McGraw-Hill©The McGraw-Hill Companies, Inc., 2003 Chapter 6 LAN Topologies.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 18 Domain Name System (DNS)
Berkeley Socket Abstraction
Review: – Why layer architecture? – peer entities – Protocol and service interface – Connection-oriented/connectionless service – Reliable/unreliable service.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 16 Socket Interface.
1 Dimension of Server Designs r Iterative vs Concurrent r Connection-oriented vs. connectionless r Stateful and stateless m Constrained by application.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
Mandatory Assignment INF3190. Part 1: Client-server communication via TCP Develop a client-server application in C which allows a client to send UNIX.
Client-server communication Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
1 K. Salah Application Layer Module K. Salah Network layer duties.
Socket Programming original by Joonbok Lee KAIST heavily adapted by /Jens.
Internet Socket Programing
Introduction To Application Layer
Chapter 10 IPv4 and IPv6 Interoperability
Network Programming with Sockets
CHAPTER 8 ELEMENTARY UDP SOCKETS
Interacting With Protocol Software
Chapter 16 Socket Interface.
PART VI Application Layer.
CSC Advanced Unix Programming, Fall 2015
An Introduction to Internetworking
IPv4 and IPv6 Interoperability
Presentation transcript:

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 CONTENTS SOME DEFINITIONS SOCKETS BYTE ORDERING ADDRESS TRANSFORMATION BYTE MANIPULATION FUNCTIONS INFORMATION ABOUT REMOTE HOST SOCKET SYSTEM CALLS CONNECTIONLESS ITERATIVE SERVER

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 CONTENTS (continued) UDP CLIENT-SERVER PROGRAMS CONNECTION-ORIENTED CONCURRENT SERVER TCP CLIENT-SERVER PROGRAMS

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 SOME DEFINITIONS 16.1

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-1 Data types

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-2 Internet address structure

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 SOCKETS 16.2

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-3 Socket address

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-4 Socket structure

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-5 Socket types

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 BYTE ORDERING 16.3

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-6 Big-endian byte order

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-7 Little-endian byte order

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 The byte order for the TCP/IP protocol suite is big endian.

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-8 Bite-order transformation

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-9 Declarations for byte-order transformation

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 ADDRESS TRANSFORMATION 16.4

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Address transformation

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declarations for address transformation functions

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 BYTE MANIPULATION FUNCTIONS 16.5

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declarations for byte-manipulation functions

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 INFORMATION ABOUT REMOTE HOST 16.6

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for gethostbyname

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Hostent structure

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 SOCKET SYSTEM CALLS 16.7

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for socket function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for bind function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for connect function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for listen function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for accept function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for sendto function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for recvfrom function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for read function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for write function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Declaration for close function

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 CONNECTIONLESS ITERATIVE SERVER 16.8

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Socket interface for connectionless iterative server

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 UDP CLIENT-SERVER PROGRAMS 16.9

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 CONNECTION-ORIENTED CONCURRENT SERVER 16.10

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure Socket interface for connection-oriented concurrent server

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure (repeated), Part I

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure (repeated), Part II

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-27, Part I Client and Server

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 16-27, Part II