Skip to main content

Tuesday March 13, 2012

Posted in

Agenda

  • movie day
    • Saturday at 1:00 in M205
    • Hackers
  • LANMines
    • rescheduled for March 24
    • posters - Kevin Worner and Dean Laganiere
    • require:
      • 14 tables
      • power supply
      • projector cart
      • crossover cables
    • bring your own food
  • Presentation: Socket Programming, Matt Richard

 

Presentation Notes

  • internet sockets
    • stream - TCP/IP
      • Transmission Control Protocol
      • how packet is stored and sent
      • 20 byte header
      • reliable connection (packets will be sent and re-sent until the receiving end indicates the packet has been received)
      • huge overhead
    • datagram - UDP
      • User Datagram Protocol
      • 8 byte header
      • connectionless
      • unreliable
      • very fast
    • raw
  • port numbers
    • 216 port numbers on a computer (0-65535)
      • 0-1023 reserved
      • 80 - HTTP
      • 23 - Telnet
      • 22 - SSH
    • local address for host computer
    • socket address = IP address + Port number
      • IP identifies computer
      • port number identifies program
  • byte order
    • network data stored big endian
    • host data stored little endian
    • htons
      • host to network short
      • 16 bits
    • htonl
      • host to network long
      • 32 bits
    • ntohs
      • network to host short
    • ntohl
      • network to host long