Skip to content

Commit 1a1f262

Browse files
committed
proxy lab
1 parent fdf84eb commit 1a1f262

File tree

19 files changed

+3417
-0
lines changed

19 files changed

+3417
-0
lines changed

proxylab-handout/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Makefile for Proxy Lab
3+
#
4+
# You may modify is file any way you like (except for the handin
5+
# rule). Autolab will execute the command "make" on your specific
6+
# Makefile to build your proxy from sources.
7+
#
8+
CC = gcc
9+
CFLAGS = -g -Wall
10+
LDFLAGS = -lpthread
11+
12+
all: proxy
13+
14+
csapp.o: csapp.c csapp.h
15+
$(CC) $(CFLAGS) -c csapp.c
16+
17+
proxy.o: proxy.c csapp.h
18+
$(CC) $(CFLAGS) -c proxy.c
19+
20+
proxy: proxy.o csapp.o
21+
22+
# Creates a tarball in ../proxylab-handin.tar that you should then
23+
# hand in to Autolab. DO NOT MODIFY THIS!
24+
handin:
25+
(make clean; cd ..; tar cvf proxylab-handin.tar proxylab-handout --exclude tiny --exclude nop-server.py --exclude proxy --exclude driver.sh --exclude port-for-user.pl --exclude free-port.sh --exclude ".*")
26+
27+
clean:
28+
rm -f *~ *.o proxy core *.tar *.zip *.gzip *.bzip *.gz
29+

proxylab-handout/README

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
####################################################################
2+
# CS:APP Proxy Lab
3+
#
4+
# Student Source Files
5+
#
6+
####################################################################
7+
8+
This directory contains the files you will need for the CS:APP Proxy
9+
Lab.
10+
11+
proxy.c
12+
csapp.h
13+
csapp.c
14+
open_clientfd_r.c
15+
These are starter files. csapp.c and csapp.h are described in
16+
your textbook. open_clientfd_r.c is a thread-safe version of
17+
open_clientfd() based on the getaddrinfo() system call.
18+
19+
You may make any changes you like to these files. And you may
20+
create and handin any additional files you like.
21+
22+
Please use `port-for-user.pl' or 'free-port.sh' to generate
23+
unused ports for your proxy or tiny server.
24+
25+
Makefile
26+
This is the makefile that builds the proxy program. Type "make"
27+
to build your solution, or "make clean" followed by "make" for a
28+
fresh build.
29+
30+
Type "make handin" to create the tarfile that you will be handing
31+
in. You can modify it any way you like. Autolab will use your
32+
Makefile to build your proxy from source.
33+
34+
port-for-user.pl
35+
Generates a random port for a particular user
36+
usage: ./port-for-user.pl <AndrewID>
37+
38+
free-port.sh
39+
Handy script that identifies an unused TCP port that you can use
40+
for your proxy or tiny.
41+
usage: ./free-port.sh
42+
43+
driver.sh
44+
The autograder for Basic, Concurrency, and Cache.
45+
usage: ./driver.sh
46+
47+
nop-server.py
48+
helper for the autograder.
49+
50+
tiny
51+
Tiny Web server from the CS:APP text

0 commit comments

Comments
 (0)