1 / 20

BSD Networking Overview

BSD Networking Overview. Chuck Davin UPenn CSE 350 5 April 2001. Application Layer. Presentation Layer. Session Layer. Transport Layer. Network Layer. Data Link Layer. Physical Layer. OSI Reference Model. Application. Application. Unix Network Implementation. System Call Interface.

rgaeta
Download Presentation

BSD Networking Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BSD Networking Overview Chuck Davin UPenn CSE 350 5 April 2001

  2. Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer OSI Reference Model

  3. Application Application Unix Network Implementation System Call Interface Sockets Protocols Abstract Network Interface Devices

  4. Application Application Application Layer Presentation Layer Session Layer System Call Interface Sockets Transport Layer Protocols Network Layer Abstract Network Interface Data Link Layer Devices Physical Layer Model vs. Implementation

  5. Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer OSI Reference ModelPossible Points of Multiplexing

  6. Application Application Unix Network ImplementationPossible Points of Multiplexing System Call Interface Sockets Protocols Abstract Network Interface Devices

  7. Engineering Choices

  8. Socket Layer Functions • Support Network Functions in a Time-Shared Environment • Synchronize protocol indications (e.g., data delivery) with individual application • Synchronize individual application requests (e.g., data transmission) with underlying protocol • Protocol-independent interface to kernel networking functions

  9. Copying! Socket Layer Service Interface • Unix System Call Interface (SCI) • Frequently requires data copying

  10. Application Application Socket Layer Data Structures System Call Interface Per- Process File Descriptor Table Global File List Socket Structure File Descriptor To Protocol- Specific State (if any) Protocols Abstract Network Interface Devices

  11. Socket Data Structure • Application Send Queue • Application Receive Queue • Protocol-Independent State Flags • E.g., generic connection state, delivery methods, selection state • Protocol-Independent Socket Options • Reference to Protocol-Specific State and Functions

  12. Protocol Layer Functions • Protocol-Specific Functions • UDP • TCP • IP

  13. Protocol Layer Service Interface • XXX_usrreq (so, cmd, …) • XXX_input (data, …) • XXX_ctlinput (data, …) • XXX_ctloutput (so, cmd, …) • XXX_init ()

  14. Protocol User Requests • PRU_ATTACH • PRU_DETACH • PRU_SEND • PRU_RECV • PRU_BIND • PRU_CONNECT • PRU_SHUTDOWN • And so forth

  15. Application Application Generic Protocol Data Structures System Call Interface Sockets To Protocol- Specific State (if any) Protocol Control Block (PCB) Protocol-Specific Links Abstract Network Interface Devices

  16. Application Application UDP Data Structures System Call Interface Sockets To Protocol- Specific State (if any) In_pcb Structure In_pcb Structure … UDP PCB Chain Abstract Network Interface Devices

  17. Internet PCB Data Structure • Local Host IP Address • Local Host Transport Port • Remote Host IP Address • Remote Host Transport Port • PCB Chain Linkage (viz. inpcb_lookup ()) • Reference to Parent Socket • Linkage to Private Protocol State

  18. Application Application TCP Data Structures System Call Interface Sockets To Protocol- Specific State (if any) … In_pcb Structure In_pcb Structure TCP PCB Chain Tcpcb Structure Tcpcb Structure Abstract Network Interface Devices

  19. TCP PCB Data Structure • Connection status • Send and Receive Windows • Send and Receive Sequence Numbers • TCP Urgent Data State • Maximum Segment Size • TCP Socket Options • Reference to Parent

  20. Questions to Ponder • Would the BSD networking implementation benefit from a more object-oriented design? • Would a UDP socket be better implemented as a subclass of a generic socket with inherited methods? • What about TCP? • What are the advantages of the current approach? Don’t try this at home!

More Related