application interface to protocols
play

Application Interface to Protocols Chuan-Ming Liu Computer Science - PowerPoint PPT Presentation

Mobile Computing & Software Engineering Lab Application Interface to Protocols Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1 Mobile Computing


  1. Mobile Computing & Software Engineering Lab Application Interface to Protocols Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1

  2. Mobile Computing & Software Engineering Lab Introduction Graphical view Loosely specified protocol software interface Interface functionality Conceptual interface specification System calls Two basic approaches to network communication Basic I/O functions in Linux Using Linux I/O with TCP/IP MCSE Lab, NTUT, TAIWAN 2

  3. Mobile Computing & Software Engineering Lab Graphical View user process applications sockets TCP/UDP kernel IP hardware MCSE Lab, NTUT, TAIWAN 3

  4. Mobile Computing & Software Engineering Lab Loosely Specified Protocol TCP/IP protocol software resides in OS Routines in OS for the interface between the applications and protocol are known as Application Program Interface (API) MCSE Lab, NTUT, TAIWAN 4

  5. Mobile Computing & Software Engineering Lab Loosely Specified Protocol TCP/IP designers design to operate in a multi-vendor environment avoid choosing any vendor’s internal data representation avoid specifying the interface in terms of features available only on a single vendor’s OS MCSE Lab, NTUT, TAIWAN 5

  6. Mobile Computing & Software Engineering Lab Loosely Specified Protocol The interface between TCP/IP and application is loosely specified Advantages Flexibility Tolerance Disadvantage designer can make the interface details different for each OS MCSE Lab, NTUT, TAIWAN 6

  7. Mobile Computing & Software Engineering Lab Loosely Specified Protocol Only a few APIs have been developed to use with TCP/IP UNIX: socket API , socket interface , or sockets MS Window: window sockets AT&T: acronym TLI MCSE Lab, NTUT, TAIWAN 7

  8. Mobile Computing & Software Engineering Lab Interface Functionality TCP/IP standards do suggest the functionality for the interface including: Allocate local resources for communication Specify local and remote communication endpoints Initiate a connection (client) Wait for an incoming connection (server) Send or receive data Determine when data arrives Generate urgent data MCSE Lab, NTUT, TAIWAN 8

  9. Mobile Computing & Software Engineering Lab Interface Functionality Handle incoming urgent data Terminate a connection gracefully Handle connection termination from the remote site Abort communication Handle error conditions or a connection abort Release local resource when communication finishes MCSE Lab, NTUT, TAIWAN 9

  10. Mobile Computing & Software Engineering Lab Conceptual Interface Specification The conceptual interface defined by the TCP/IP standards does not specify data representations or programming details; it merely provides an example of one possible API that an operation system can offer to application programs that use TCP/IP OS designers are free to implement as long as the functionality holds MCSE Lab, NTUT, TAIWAN 10

  11. Mobile Computing & Software Engineering Lab System Calls System calls Mechanism that most OS’s use to transfer control between applications and OS procedures Like function calls (for a programmer) MCSE Lab, NTUT, TAIWAN 11

  12. Mobile Computing & Software Engineering Lab System Calls Applica- Applica- Applica- tion 1 tion 2 tion n System functions called by applications OS kernel containing TCP/IP protocol software MCSE Lab, NTUT, TAIWAN 12

  13. Mobile Computing & Software Engineering Lab Approaches to Network Communication Designers must choose the exact set of procedures used to access TCP/IP protocols Two approaches New implementation on all conceptual operations Using convention I/O primitives but overload them MCSE Lab, NTUT, TAIWAN 13

  14. Mobile Computing & Software Engineering Lab Basic I/O Functions six system functions for I/O (on file or device) open close read write lseek ioctl MCSE Lab, NTUT, TAIWAN 14

  15. Mobile Computing & Software Engineering Lab Using LUNIX I/O with TCP/IP when adding TCP/IP protocols to UNIX system, we extend the conventional I/O facilities the set of file descriptor for application to use read and write system calls to with new network descriptor Not all network communication fit easily into UNIX open-read-write-close paradigm MCSE Lab, NTUT, TAIWAN 15

Recommend


More recommend