Transport Layer
Transmission Control Protocol(TCP): communicates using sockets (IP address and port#), provides reliable connection
User Data Protocol(UDP): allows applications to send raw IP datagrams
Network Layer
Uses Internet Protocol (IP)Uses IP addresses IP header contains source address,
destination address, version, length, checksum, etc.
Hypertext Transfer Protocol(HTTP)
Allows clients to request files/other resources from a server
ASCII Protocol – easy to talk to
HTTP Request Methods
GET - Request to read a web page or whatever information is identified by the request-URI
POST - Append to a named resource (e.g. a Web page), or provide a block of data to a data-handling process at the server
HEAD - Request to read a web page's header
PUT - Request to store a web page
DELETE - Remove a web page
LINK - Connects two existing resources
UNLINK - Breaks an existing connection between two resources
OutputHTTP/1.1 200 OK
Date: Sat, 23 Nov 2002 06:35:44 GMT
Server: Apache/1.3.26 WebAuth 2.5 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6e WebAuth/2.5 mod_fastcgi/2.2.12
Connection: close
Content-Type: text/html
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Microsoft FrontPage 4.0">
<title>EE281: Embedded System Design Laboratory</title>
<meta name="keywords" content="here">
</head>
……………………
Status Codes200 OK201 Created202 Accepted204 No Content301 Moved Permanently302 Moved Temporarily304 Not Modified400 Bad Request401 Unauthorized403 Forbidden404 Not Found500 Internal Server Error501 Not Implemented502 Bad Gateway503 Service Unavailable
Function Prototypes
void show_regs(void);void show_packet(void);void tcp(void);void assemble_ack(void);void write_asix(unsigned char regaddr, unsigned char regdata);void read_asix(unsigned char regaddr);void get_packet(void);void setipaddrs(void);void cksum(void);void echo_packet(void);void send_tcp_packet(void);void arp(void);void icmp(void);void udp(void);