-
Notifications
You must be signed in to change notification settings - Fork 1
/
readme
52 lines (36 loc) · 1.41 KB
/
readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
public traceroute server
=======================
Server
------
traceroute server implementation which takes in a destination IP address or a hostname and displays the traceroute results of the traceroute utility.
The server can be invoked as
./tracerouteServer [PORT <port number> RATE <number requests> <number seconds> MAX_USERS <number of users> STRICT_DEST <0 or 1>]
Server logs the main commands excuted and the errors resultes including the following
Connection information
1. server connecting on port : 1620 with maximum request count: 2 in 6 seconds.
2. Allowed maximum number of concurrent users are : 1
3. Strict destination enabled : 1
4. User number: 1
Errors
1. Invalid port number.
2. Socket opening errors.
3. Socket binding errors.
4. Accepting request errors.
5. Max number of users exceeds.
6. Reading data from client errors.
Issued Commands
1.trace route [destination]
2. traceroute me
3. help
4. quit
5. Invalid commands
Client
------
simple telnet client that reads the user input commands, sends the commnads to server and display results back to user.
References
---------
Client server implementation details
http://www.linuxhowtos.org/C_C++/socket.htm
http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html
Regular expression to validate IP address & Hostname
http://stackoverflow.com/questions/106179/regular-expression-to-match-hostname-or-ip-address