Project 4 Stages:
Stage 2: Concurrent Server
Stage 3: Add to your server the capability
to browse directories.
Index of http-root-dir/...
| Name | Last Modified | Size | Description |
Parent Directory/ |
01-Nov-2000 23:52 | - | |
htdocs/ |
25-Oct-2000 15:38 | - | |
cgi-bin/ |
01-Nov-2000 21:23 | - | |
cgi-src/ |
01-Nov-2000 21:56 | - | |
icons/ |
26-Oct-2000 12:55 | - | |
tempfiles/ |
25-Oct-2000 21:10 | - |
If the Parent Directory does not contain an index.html file
| ----------------------------------- |
| ----------------------------------- |
| ----------------------------------- |
| ----------------------------------- |
DO ERROR CHECKING
<IMAGE>
Stage 4:
Implementing CGI
-- File is static content
--
<IMAGE>
-- CGI Dynamic Content
http://monkey...:80/file.html
(static)
http://monkey..:80/CGI-BIN/hello?a=b&c=d
where "hello" is the executable file
"a=b&c=d" is the query string
1) put "name=value" -- putenv()
2) "QUERY_STRING = <query>"
=> a=b&c=d
3) "REQUEST_METHOD =GET"
Header
ourport HTTP/1.1 .... follows <crlf>
server:<sp><type><crlf>
CGI port content-type
4) redirect the output to
socket
dup2(ss,1);
5) execvp(" http-root-dir/cgi-bin/exe");
Check that, only, progs in cgi-bin are run.
GOAL: Make cgi-bin file run.
Notes for 10/18/00 -- Prof. Gustavo's Lecture
Local Loop
- Standard connection between home/business and central
office
Analog service - POTS
Digital service
ISDN -- Voice Data
DSL -- Digital Subscriber Line
<IMAGE>
- Frequency response of a phone line for high frequencies is irregular.
- A DSL modem looks for places in the frequency spectrum
where the response is good and use those channels.
ADSL - Asymmetric Digital Subscribers Line
- DSL variant (popular)
- Higher capacity downstream than upstream
Downstream 6.4 Mpbs
Upstream
640Kpbs
- Routing Algorithms
Next Hop Forwarding
- Most popular
- Each router has a table (Routing table) that gives the next router necessary
to reach destination.
<IMAGE>
R1 Routing Table
|
R2 Routing Table
|
R3 Routing Table
|
Wide Area Networks
- Span large distances
- Connect multiple LANs, MANs using routers (also
called packet switches)
- The router connects different nets and forwards
pckets using destination.
- Differences between bridge and router
- Bridge extends one ethernet network
- Router links two or more separate ethernet networks
- Each ethernet is still autonomous
A router:
- Receive packet
- Store it in memory
- Looks at the destination
- Forwards packet to destination
A host address is divided into two parts ( Network
#, Host #)
- The router uses the Network # for routing the
packet.
- The router has enough information on how to route
a packet to its destination.
Cable Modems
- Use Cable TV
- Use FDM
- Group of subscribers in neighborhood share the
same bandwidth.
- Neighborhoods are connected to central office
using optical fibre.
<IMAGE>