当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

复旦大学:《计算机网络 Computer Networking》课程实验指导_因特网中继聊天(IRC)服务器_Network Project1 Request 2013

资源类别:文库,文档格式:PDF,文档页数:9,文件大小:189.48KB,团购合买
点击下载完整版文档(PDF)

Computer Networks Project 1: Internet Relay Chat(IRC) Server TA:07302010028@fudan.edu.cn07302010096@fudan.edu.cn Assigned: March 14. 2011 Checkpoint I due: March 27, 2011 Final version due: April 10, 2011 23: 00: 00 Introduction The purpose of this project is to give you experience in developing concurrent network applications. You will use the Berkeley Sockets API to write an Internet chat server using a subset of the Internet Relay Chat protocol (IRC)[1I IRC is a global, distributed, real-time chat system that operates over the Internet. An IRC etwork consists of a set of interconnected servers. Once users are connected to an irc server they can converse with other users connected to any server in the IRC network. IRC provides for group communication, via named channels, as well as personal communication through"private messages. For more information about IRC, including available client software and public IRC networks, please see The IRC Prelude [2] If you have not used IRC before, you may want to try it out to get a feel for what it is. For a quick start, log in to an Linux OS with irssi installed, and run irssi -c irc freenode. net -n nickname where nickname is the nickname you want to use. Then type / join #networking to join a networking discussion channel. Other channels you might be interested include #gentoo, #redha #perl, and #c++. After you have tried out the text mode irC client, you may want to try out graphical clients such as xchat and chatzilla( part of mozilla) The tar file for this project can be found her fp.m∥0.132.l4.3 classes08102计算机网络 PROJECT/ Project/ This is a solo project. You must implement and submit your own code We recommend adhering to a schedule like mileson 3/14 Project assigned 4/3 standalone irc server complete 4/5 standalone irc server tested thoroughly

1 Computer Networks Project 1: Internet Relay Chat (IRC) Server TA: 07302010028@fudan.edu.cn 07302010096@fudan.edu.cn Assigned: March 14, 2011 Checkpoint1 due: March 27, 2011 Final version due: April 10, 2011 23:00:00 1 Introduction The purpose of this project is to give you experience in developing concurrent network applications. You will use the Berkeley Sockets API to write an Internet chat server using a subset of the Internet Relay Chat protocol (IRC) [1]. IRC is a global, distributed, real-time chat system that operates over the Internet. An IRC network consists of a set of interconnected servers. Once users are connected to an IRC server, they can converse with other users connected to any server in the IRC network. IRC provides for group communication, via named channels, as well as personal communication through "private" messages. For more information about IRC, including available client software and public IRC networks, please see The IRC Prelude [2]. If you have not used IRC before, you may want to try it out to get a feel for what it is. For a quick start, log in to an Linux OS with irssi installed, and run irssi -c irc.freenode.net -n nickname where nickname is the nickname you want to use. Then type /join #networking to join a networking discussion channel. Other channels you might be interested include #gentoo, #redhat, #perl, and #c++. After you have tried out the text mode IRC client, you may want to try out graphical clients such as xchat and chatzilla (part of mozilla). 2 Logistics • The tar file for this project can be found here: ftp://10.132.141.33/classes/08/102 计算机网络/PROJECT/Project1 • This is a solo project. You must implement and submit your own code. • We recommend adhering to a schedule like: date milestone 3/14 Project assigned 3/27 checkpoint1due-handling multiple clients 4/3 standalone irc server complete 4/5 standalone irc server tested thoroughly 4/18 last minute rush to get things done and hand-in

Overview An IRC network is composed of a set of nodes interconnected by virtual links in an arbitrary topology. Each node runs a process that we will call a routing daemon. Each routing daemon maintains a list of IRC users available to the system Figure I shows a sample IRC network composed of 5 nodes. The solid lines represent virtual links between the nodes. Each node publishes a set of users(i.e, the nicks of the IRC clients connected to it)to the system. The dotted lines connect the nodes to their user sets The usage model is the following: If Bob wants to contact Alice the iRC server on the left first must find the route or path from it to the node on the right. Then, it must forward Bob's message to each node along the path(the dashed line in the figure)until it reaches the IRC server at Alices node. which can then send the message to the client alice In this project, you only need to implement a standalone IRC server. You can assume that there is only one IRC server and all clients are connected to the server. RC Sorver outing Proloc Figure 1: IRC network 4 Definitions nodeID-unique identifier that identifies an IRC server, or node In the first project, the nodeld for the standalone irc server should be 1 destination-IRC nickname or channel as a null terminated character string. As per the irC RFC, destinations will be at most 9 characters long and may not contain spaces IRC port- The TCP port on the IRC server that talks to clients Note: In Project 1, only TCP port which is used to talks to clients are needed, and only l serve ssumed. But in Project2, IRC router is required to be implemented. And IRC Server needs to be expanded to implement more IRC Command to talk with IRC router. So consideration to extend your code is necessary for convenience of reuse your code in Project2 The Irc server Your server will implement a subset of the original IRC protocol. The original IRC protocol is IRC server, we have provided an annotated version of the RFC [4]. For this project, you should defined in RFC 14593. Because RFC 1459 omits some details that are required to implement

2 3 Overview An IRC network is composed of a set of nodes interconnected by virtual links in an arbitrary topology. Each node runs a process that we will call a routing daemon. Each routing daemon maintains a list of IRC users available to the system. Figure 1 shows a sample IRC network composed of 5 nodes. The solid lines represent virtual links between the nodes. Each node publishes a set of users (i.e., the nicks of the IRC clients connected to it) to the system. The dotted lines connect the nodes to their user sets. The usage model is the following: If Bob wants to contact Alice; the IRC server on the left first must find the route or path from it to the node on the right. Then, it must forward Bob's message to each node along the path (the dashed line in the figure) until it reaches the IRC server at Alice's node, which can then send the message to the client Alice. In this project, you only need to implement a standalone IRC server. You can assume that there is only one IRC server and all clients are connected to the server. Figure 1: IRC network 4 Definitions • nodeID - unique identifier that identifies an IRC server, or node. In the first project, the nodeID for the standalone IRC server should be 1. • destination - IRC nickname or channel as a null terminated character string. As per the IRC RFC, destinations will be at most 9 characters long and may not contain spaces. • IRC port - The TCP port on the IRC server that talks to clients. Note: In Project 1, only TCP port which is used to talks to clients are needed, and only 1 server is assumed. But in Project2, IRC router is required to be implemented. And IRC Server needs to be expanded to implement more IRC Command to talk with IRC router. So consideration to extend your code is necessary for convenience of reuse your code in Project2. 5 The IRC Server Your server will implement a subset of the original IRC protocol. The original IRC protocol is defined in RFC 1459 [3]. Because RFC 1459 omits some details that are required to implement an IRC server, we have provided an annotated version of the RFC [4]. For this project, you should

al ways refer to the annotated version of the RFC, not the original version. We have chosen a subset of the protocol that will provide you with experience developing a concurrent network application without spending an inordinate amount of time implementing lots of features Specifically, your server must implement the following commands Basic Commands NICK-Give the user a nickname or change the previous one. Your server should handle plicate nicknames and report an error message USER-Specify the username, hostname, and real name of a user QUIT-End the client session. The server should announce the client's departure to all other users sharing the channel with the departing client Channel commands JOIN -Start listening to a specific channel. Although the standard irC protocol allows a client to join multiple channels simultaneously, your server should restrict a client to be a member of at most one channel. Joining a new channel should implicitly cause the client to leave the current channel PART-Depart a specific channel. Though a user may only be in one channel at a time, PART should still handle multiple arguments. If no such channel exists or it exists but the user is not currently in that channel, send the appropriate error message LIST- List all existing channels on the local server only. Your server should ignore arameters and list all channels and the number of users on the local server in each channel Advanced commands PRIVMSG-Send messages to users. The target can be either a nickname or a channel. If the target is a channel, the message will be broadcast to every user on the specified channel, except the message originator. If the target is a nickname, the message will be sent only to that user WHO-Query information about clients or channels. In this project, your server only needs to support querying channels on the local server. It should do an exact match on the channel name and return the users on that channe For all other commands, your server must return ERR UNKNOWNCOMMAND. If you are unable to implement one of the above commands(perhaps you ran out of time),your server must return the error code ERR UNKNOWNCOMMAND, rather than failing silently, or in some other manner Your server should be able to support multiple clients concurrently. The only limit to the number of concurrent clients should be the number of available file descriptors in the operating system(the min of ulimit-n and FD SETSIZE-typically 1024). While the server is waiting for a client to send the next command, it should be able to handle inputs from other clients. Also, your server should not hang up if a client sends only a partial command. In general, concurrency can be Ither select or multiple threads. However, in this proje your server using select to support concurrent connections. See the resources section below for help on these topics As a public server, your implementation should be robust to client errors. For example, your server should be able to handle multiple commands in one packet. It must not overflow any buffers when the client sends a message that is too long(longer than 512 bytes). In general, your

3 always refer to the annotated version of the RFC, not the original version. We have chosen a subset of the protocol that will provide you with experience developing a concurrent network application without spending an inordinate amount of time implementing lots of features. Specifically, your server must implement the following commands: Basic Commands • NICK - Give the user a nickname or change the previous one. Your server should handle duplicate nicknames and report an error message. • USER - Specify the username, hostname, and real name of a user. • QUIT - End the client session. The server should announce the client's departure to all other users sharing the channel with the departing client. Channel Commands • JOIN - Start listening to a specific channel. Although the standard IRC protocol allows a client to join multiple channels simultaneously, your server should restrict a client to be a member of at most one channel. Joining a new channel should implicitly cause the client to leave the current channel. • PART - Depart a specific channel. Though a user may only be in one channel at a time, PART should still handle multiple arguments. If no such channel exists or it exists but the user is not currently in that channel, send the appropriate error message. • LIST - List all existing channels on the local server only. Your server should ignore parameters and list all channels and the number of users on the local server in each channel. Advanced Commands • PRIVMSG - Send messages to users. The target can be either a nickname or a channel. If the target is a channel, the message will be broadcast to every user on the specified channel, except the message originator. If the target is a nickname, the message will be sent only to that user. • WHO - Query information about clients or channels. In this project, your server only needs to support querying channels on the local server. It should do an exact match on the channel name and return the users on that channel. For all other commands, your server must return ERR UNKNOWNCOMMAND. If you are unable to implement one of the above commands (perhaps you ran out of time), your server must return the error code ERR UNKNOWNCOMMAND, rather than failing silently, or in some other manner. Your server should be able to support multiple clients concurrently. The only limit to the number of concurrent clients should be the number of available file descriptors in the operating system (the min of ulimit -n and FD SETSIZE - typically 1024). While the server is waiting for a client to send the next command, it should be able to handle inputs from other clients. Also, your server should not hang up if a client sends only a partial command. In general, concurrency can be achieved using either select or multiple threads. However, in this project, you must implement your server using select to support concurrent connections. See the resources section below for help on these topics. As a public server, your implementation should be robust to client errors. For example, your server should be able to handle multiple commands in one packet. It must not overflow any buffers when the client sends a message that is too long (longer than 512 bytes). In general, your

erver should not be vulnerable to a malicious client. This is something we will test for Note your server behaves differently from a standard iRC server for some of the required commands(e.g, JOIN). Therefore, you should not use a standard iRC server as your reference for your implementation. Instead, refer to the annotated version of the rfc on the course web page Testing and debugging of your IRC server can be done with our provided sircc client(discussed later in section 7), or a telnet client for issuing commands and receiving responses 6 Implementation Details and usage Your programs must be written in the C or C++ programming language. You are not library functions, and the csapp wrapper library developed for ICS. You may use the pthread o- allowed to use any custom socket classes or libraries, only the standard libsocket, the provide library, but you are responsible for learning how to use it correctly yourself if you choose to To use the csapp wrapper library, you must link with libpthread(-lpthread ) If you wish to use other libraries, please contact us 6.1 Compiling You responsible for making sure your code compile and run correctly on the x86 machines running Linux. We recommend using gcc to compile your program and gdb to debug it. You nould use the-Wall flag when compiling to generate full warnings and to help debug. Other tools available are suggested are ElectricFence [7(link with-lefence)and Valgrind [8]. These tools will detect overflows and memory leaks respectively. For this project, you will also be responsible for turning in a GNUMake(gmake)compatible Makefile. See the gNU make manual [5]for details. When we run gmake we should end up with the simplified IRC Server which you should call sired 6.2 Command Line arguments Your IRC server will al ways have two arguments usage:. /sired nodeld config file nodeld- The nodeld of the node should be l for the standalone irc server configfile -The configuration filename Configuration File Format This file describes the neighborhood of a node. In this project, since there are no neighbors other than the standalone server itself, the file is used to specify the rFC port used by the server. The format of the configuration file is very simple, and we will supply you with code to parse it. Note that most of the fields will become important only in the next project. Each line has the following format nodeld hostname routing-port local-port IRC-port nodeld An identifier of the server(it should match the nodeld argument when starting the IrC server) hostname

4 server should not be vulnerable to a malicious client. This is something we will test for. Note your server behaves differently from a standard IRC server for some of the required commands (e.g., JOIN). Therefore, you should not use a standard IRC server as your reference for your implementation. Instead, refer to the annotated version of the RFC on the course web page. Testing and debugging of your IRC server can be done with our provided sircc client(discussed later in section 7), or a telnet client for issuing commands and receiving responses. 6 Implementation Details and Usage Your programs must be written in the C or C++ programming language. You are not allowed to use any custom socket classes or libraries, only the standard libsocket, the provided library functions, and the csapp wrapper library developed for ICS. You may use the pthread library, but you are responsible for learning how to use it correctly yourself if you choose to. To use the csapp wrapper library, you must link with libpthread (-lpthread). If you wish to use other libraries, please contact us. 6.1 Compiling You responsible for making sure your code compile and run correctly on the x86 machines running Linux. We recommend using gcc to compile your program and gdb to debug it. You should use the -Wall flag when compiling to generate full warnings and to help debug. Other tools available are suggested are ElectricFence [7] (link with -lefence) and Valgrind [8]. These tools will detect overflows and memory leaks respectively. For this project, you will also be responsible for turning in a GNUMake (gmake) compatible Makefile. See the GNU make manual [5] for details. When we run gmake we should end up with the simplified IRC Server which you should call sircd. 6.2 Command Line Arguments Your IRC server will always have two arguments: usage: ./sircd nodeID config_ file nodeID -The nodeID of the node, should be 1 for the standalone IRC server. configfile -The configuration filename. 6.3 Configuration File Format This file describes the neighborhood of a node. In this project, since there are no neighbors other than the standalone server itself, the file is used to specify the RFC port used by the server. The format of the configuration file is very simple, and we will supply you with code to parse it. Note that most of the fields will become important only in the next project. Each line has the following format: nodeID hostname routing-port local-port IRC-port nodeID An identifier of the server (it should match the nodeID argument when starting the IRC server). hostname

The name or iP address of the machine where the neighbor node is running, it should be localhost for the standalone server local-por The TCP port on which the routing daemon should listen for the local IRC server and you can ignore this routing-port The port where the neighbor node listens for routing messages and you can ignore this IRC-Dort The tCP port on which the IRC server listens for clients and other IRC servers, you should specify the port to use How does a node find out which ports it should use as IRC ports? When reading the configuration file, if an entry's nodeld matches the node's nodeld of the node(passed in on the command line), the node uses the specified port number as RFC port This is how we will start your IRC network /sired 1 node 1. conf The IRC Server will be passed its nodeld and the configuration file to find out about what rts it should use/talk to 6.5 Framework Code We have provided you with some frame work code to simplify some tasks for you, like reading in the command line arguments and parsing the configuration file. You do not have to use any of this code if you do not want to. This code is documented in rtlib h and implemented in rtlib c. Feel free to modify this code also Testing Code quality is of particular importance to server robustness in the presence of client errors and malicious attacks. Thus, a large part of this assignment(and programming in general)is knowing how to test and debug your work. There are many ways to do this; be creative. We would like to know how you tested your server and how you convinced yourself it actually works. To this end you should submit your test code along with brief documentation describing what you did to test that your server works. The test cases should include both generic ones that check the server functionality and those that test particular corner cases. If your server fails on some tests and you do not have time to fix it, this should also be documented we would rather appreciate that you know and acknowledge the pitfalls of your server, than miss them). Several paragraphs(or even a bulleted list of things done and why) should suffice for the test case documentation To help you get started on testing, we have provided a simple irC client srcc and several example test scripts. These will give you an idea of what tests we will use to evaluate your work, and ensure that you are on the right track with your server

5 The name or IP address of the machine where the neighbor node is running, it should be localhost for the standalone server. local-port The TCP port on which the routing daemon should listen for the local IRC server and you can ignore this. routing-port The port where the neighbor node listens for routing messages and you can ignore this. IRC-port The TCP port on which the IRC server listens for clients and other IRC servers, you should specify the port to use. How does a node find out which ports it should use as IRC ports? When reading the configuration file, if an entry's nodeID matches the node's nodeID of the node (passed in on the command line), the node uses the specified port number as RFC port. 6.4 Running This is how we will start your IRC network. ./sircd 1 node1.conf The IRC Server will be passed its nodeID and the configuration file to find out about what ports it should use/talk to. 6.5 Framework Code We have provided you with some framework code to simplify some tasks for you, like reading in the command line arguments and parsing the configuration file. You do not have to use any of this code if you do not want to. This code is documented in rtlib.h and implemented in rtlib.c. Feel free to modify this code also. 7 Testing Code quality is of particular importance to server robustness in the presence of client errors and malicious attacks. Thus, a large part of this assignment (and programming in general) is knowing how to test and debug your work. There are many ways to do this; be creative. We would like to know how you tested your server and how you convinced yourself it actually works. To this end, you should submit your test code along with brief documentation describing what you did to test that your server works. The test cases should include both generic ones that check the server functionality and those that test particular corner cases. If your server fails on some tests and you do not have time to fix it, this should also be documented (we would rather appreciate that you know and acknowledge the pitfalls of your server, than miss them). Several paragraphs (or even a bulleted list of things done and why) should suffice for the test case documentation. To help you get started on testing, we have provided a simple IRC client sircc and several example test scripts. These will give you an idea of what tests we will use to evaluate your work, and ensure that you are on the right track with your server

sRcc The since program takes input from stdin as client commands to send to the server, and echoes server reply on the screen. This can be used to checktheexactformatsofresponses fromyour server andtest how your server behaveswhengiven input is not compliant with the IRC specification unix>/srcc -h usage: srcc and port> are the address and port number of your IRC server By default, the address is set to your local machine and the port number is 666 n order to avoid port collisions from different people, use port numbers in the range: [20000+last 2 bits of your student number*100, 20000-+ last 2 bits of your student number*100+99] For example, if your last 2 bits of your student number is 23, then you should choose the ort numbers from the following range: [22300, 22399] For project 1, you only need one server, o the address can be the following Node id IP Address Routing port Local port IRC Port 1270.0.1 22300 22301 22302 IRC Test scripts The test scripts test your IRC server against different types of commands. For example login. exp checks the replies of the command niCK and USer /lo usage: login.expand<portare the address and port number of your IRC server You may use the provided test scripts as a base to build your own test case. You may also find the following tools to be useful in your test code development expect Quoting from the expect man page, Expect is a program that"talks"to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue 8 Hand in Your code should submitted/p:∥0.32.141.33lase0/02计算机网终 /WORK UPLOAD/Project 1/,name Checkpoint 1-/Project 1/YOUR STUDENT ID/checkpoint Final Hand-in-/Project1/ YOUR STUDENT ID/final your repository should contain the following files Makefile- Make sure all the variables and paths are set correctly such that your program compiles in the handin directory. The Makefile should build executable named sired

6 sircc: The sircc program takes input from stdin as client commands to send to the server, and echoes server reply on the screen. This can be used to checktheexactformatsofresponses fromyour server andtest how your server behaveswhengiven input is not compliant with the IRC specification. unix>./sircc -h usage: sircc When using sircc, and are the address and port number of your IRC server. By default, the address is set to your local machine and the port number is 6667. ports: In order to avoid port collisions from different people, use port numbers in the range: [20000+last 2 bits of your student number*100, 20000+ last 2 bits of your student number *100+99] For example, if your last 2 bits of your student number is 23, then you should choose the port numbers from the following range: [22300, 22399]. For project 1, you only need one server, so the address can be the following: Node ID IP Address Routing Port Local Port IRC Port 1 127.0.0.1 22300 22301 22302 IRC Test scripts: The test scripts test your IRC server against different types of commands. For example, login.exp checks the replies of the command NICK and USER. unix>./login.exp usage:login.exp Here andare the address and port number of your IRC server. You may use the provided test scripts as a base to build your own test case. You may also find the following tools to be useful in your test code development: expect Quoting from the expect man page, Expect is a program that "talks" to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue. 8 Hand in Your code should submitted ftp://10.132.141.33/classes/08/102 计算机网络 /WORK_UPLOAD/Project 1/, name • Checkpoint1 - /Project1/ YOUR_STUDENT_ID/checkpoint • Final Hand-in - /Project1/ YOUR_STUDENT_ID/final, your repository should contain the following files: • Makefile - Make sure all the variables and paths are set correctly such that your program compiles in the handin directory. The Makefile should build executable named sircd

All of your source code-(files ending with c, h, etc. only, no o files and no executables Design doc- File containing a brief description of your design of your IRC server. tests txt- File containing documentation of your test cases and any known issues you Grading Server core networking: 20 points The grade in this section is intended to reflect your ability to write the"core networking code. This is the stuff that deals with setting up connections, reading/writing from them(see the resources section below). Even if your server does not implement any IRC commands, your project submission can get up to 20 points here. Thus it is better to have partial functionality working solidly than lots of code that doesn't actually do anything correctl Server IrC protocol: 25 points The grade in this section reflects how well you read, interpreted, and implemented the IRC tocol. We will test that all the commands specified in the project handout work. All commands sent to your server for this part of the testing will be valid. So a server that completely and correctly implements the specified commands, even if it does not check for invalid messages, will receive Robustness: 25 points Server robustness: 13 points Since code quality is of a high priority in server programming, we will test your program in a variety of ways using a series of test cases. For example, we will send your server a message longer than 512 bytes to test if there is a buffer overflow We will make sure that your server does something reasonable when given an unknown command, or a command with invalid arguments We will verify that your server correctly handles clients that leave abruptly(without sending a QUIT message). We will test that your server correctly handles concurrent requests from multiple clients, without blocking inappropriately. The only exception is that your server may block while doing dNs lookups However, there are many corner cases that the rFC does not specify. You will find that this is very common in"real world"programming since it is difficult to foresee all the problems that light arise. Therefore, we will not require your server pass all of the testcases in order to get a full poin We will also look at your own documented testcases to evaluate how you tested your work

7 • All of your source code - (files ending with .c, .h, etc. only, no .o files and no executables) • Design.doc - File containing a brief description of your design of your IRC server. • tests.txt - File containing documentation of your test cases and any known issues you have. 9 Grading • Server core networking: 20 points The grade in this section is intended to reflect your ability to write the "core" networking code. This is the stuff that deals with setting up connections, reading/writing from them (see the resources section below). Even if your server does not implement any IRC commands, your project submission can get up to 20 points here. Thus it is better to have partial functionality working solidly than lots of code that doesn't actually do anything correctly. • Server IRC protocol: 25 points The grade in this section reflects how well you read, interpreted, and implemented the IRC protocol. We will test that all the commands specified in the project handout work. All commands sent to your server for this part of the testing will be valid. So a server that completely and correctly implements the specified commands, even if it does not check for invalid messages, will receive 20 points here. • Robustness: 25 points - Server robustness: 13 points -Testcases: 12 points Since code quality is of a high priority in server programming, we will test your program in a variety of ways using a series of test cases. For example, we will send your server a message longer than 512 bytes to test if there is a buffer overflow. We will make sure that your server does something reasonable when given an unknown command, or a command with invalid arguments. We will verify that your server correctly handles clients that leave abruptly (without sending a QUIT message). We will test that your server correctly handles concurrent requests from multiple clients, without blocking inappropriately. The only exception is that your server may block while doing DNS lookups. However, there are many corner cases that the RFC does not specify. You will find that this is very common in "real world" programming since it is difficult to foresee all the problems that might arise. Therefore, we will not require your server pass all of the testcases in order to get a full 25 points. We will also look at your own documented testcases to evaluate how you tested your work

Style: 20 points Poor design, documentation, or code structure will probably reduce your grade by making it hard for you to produce a working program and hard for the grader to understand it; egregious failures in these areas will cause your grade to be lowered even if your implementation performs dequately To help your development and testing, we suggest your server optionally take a verbosity level witch(-V level) as the cor a line ar to control how much infe For example, -v 0 means nothing printed, -v0 means basic logging of users signing on and o, -V 2 means logging every message event Checkpoint: 10 points Checkpoint does not include tests section. Late policy does not apply to the check you or you will not get the points applicable to the checkpoint In the first, core networking, i.e. server handling multiple clients concurrently, will be tested the second checkpoint. We will provide the test script for this checkpoint. esources For information on network programming, the following may be helpful Class Textbook- Sockets. etc Computer Systems: A Programmer's Perspective(ICS text book)[9] BSD Sockets: A Quick and Dirty Primer [101 An Introductory 4.4 BSD Interprocess Communication Tutorial [ll] · Unix Socket FAQ[2 Sockets section of the gNu C Library manual Installed locally: info libc Available online: GNU C Library manual [13] · man pages -Installed locally(e. g. man socket) Available online: the Single UNIX Specification I Google groups -Answers to almost anything [15]

8 • Style: 20 points Poor design, documentation, or code structure will probably reduce your grade by making it hard for you to produce a working program and hard for the grader to understand it; egregious failures in these areas will cause your grade to be lowered even if your implementation performs adequately. To help your development and testing, we suggest your server optionally take a verbosity level switch (-v level) as the command line argument to control how much information it will print. For example, -v 0 means nothing printed, -v 0 means basic logging of users signing on and o ,-v 2 means logging every message event. Checkpoint: 10 points Checkpoint does not include tests section. Late policy does not apply to the checkpoint, so you must submit on time or you will not get the points applicable to the checkpoint. In the first, core networking, i.e. server handling multiple clients concurrently, will be tested for the second checkpoint. We will provide the test script for this checkpoint. 10. Resources For information on network programming, the following may be helpful: • Class Textbook - Sockets, etc • Computer Systems: A Programmer's Perspective (ICS text book) [9] • BSD Sockets: A Quick and Dirty Primer [10] • An Introductory 4.4 BSD Interprocess Communication Tutorial [11] • Unix Socket FAQ [12] • Sockets section of the GNU C Library manual -Installed locally: info libc - Available online: GNU C Library manual [13] • man pages -Installed locally(e.g. man socket) - Available online: the Single UNIX Specification [14] • Google groups - Answers to almost anything [15]

References [iiRcRfc:http://www.irchelp.org/irchelp/rfc/ 2theiRcPrelude:http://www.irchelp.org/irchelp/new2irc.html 3]rfc1459:http://www.ietf.org/rfc/rfc1459.txt 4]fp/∥1013214133/cass/07/092计算机网终/ PROJECT//Proiect 5]gnuMakemAnual:http://www.gnu.org/manual/software/make/htmlmono/make.html [6]rfc1122:http://www.ietf.org/rfc/rfcl122.txtpage1l [7electrIcfence:http://perens.com/freeSoftware/electricfence/ 18valgrind:http://valgrind.org [9]csapp:http://csapp.cs.cmu.edu [10]http://www.frostbytes.com/jimf/papers/sockets/sockets.html [1l]http://docs.freebsdorg/44doc/psd/20.ipctut/paper.pdf http://www.developerweb.net/forum/forumdisplayphp?s=f47b63594e6b831233c4b8ebaf10a614& f=70 [13http://www.gnu.org/software/libc/manual/ [14]http://www.opengroup.org/onlinepubs/007908799/ [15]http://groups.google.com

9 References [1]IRC RFC: http://www.irchelp.org/irchelp/rfc/ [2]The IRC Prelude: http://www.irchelp.org/irchelp/new2irc.html [3] RFC 1459: http://www.ietf.org/rfc/rfc1459.txt [4] ftp://10.132.141.33//classes//07//092计算机网络//PROJECT//Project1 [5] GNU Make Manual: http://www.gnu.org/manual/software/make/html mono/make.html [6] RFC 1122: http://www.ietf.org/rfc/rfc1122.txt,page 11 [7]ElectricFence:http://perens.com/FreeSoftware/ElectricFence/ [8] Valgrind: http://valgrind.org/ [9] CSAPP: http://csapp.cs.cmu.edu [10] http://www.frostbytes.com/ jimf/papers/sockets/sockets.html [11] http://docs.freebsd.org/44doc/psd/20.ipctut/paper.pdf [12] http://www.developerweb.net/forum/forumdisplay.php?s=f47b63594e6b831233c4b8ebaf10a614& f=70 [13] http://www.gnu.org/software/libc/manual/ [14] http://www.opengroup.org/onlinepubs/007908799/ [15] http://groups.google.com

点击下载完整版文档(PDF)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
已到末页,全文结束
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有