Notes for 10/16 /00: The day Dr. Gustavo was absent

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 


DIR Parent Directory/ 01-Nov-2000 23:52 -
DIR htdocs/ 25-Oct-2000 15:38 -
DIR cgi-bin/ 01-Nov-2000 21:23 -
DIR cgi-src/ 01-Nov-2000 21:56 -
DIR icons/ 26-Oct-2000 12:55 -
DIR tempfiles/ 25-Oct-2000 21:10 -

If the Parent Directory does not contain an index.html file
 

                #include <dirent.h>
                struct dirent * readdir(DIR* dirp)

                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
Net  Router/Interface
N1 i1
N2 R2, i2
N3 i2
N4 R2,i2
N5 R2, i2
R2 Routing Table
Net  Router/Interface
N1 R1,i1
N2 R3, i2
N3 i1
N4 i2
N5 i3
R3 Routing Table
Net  Router/Interface
N1 R2,i2
N2 i1
N3 R2,i2
N4 i2
N5 R2, i2

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>