电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本
换一换
首页 金锄头文库 > 资源分类 > DOC文档下载
分享到微信 分享到微博 分享到QQ空间

网络编程技术实验指导书

  • 资源ID:470269099       资源大小:171KB        全文页数:11页
  • 资源格式: DOC        下载积分:15金贝
快捷下载 游客一键下载
账号登录下载
微信登录下载
三方登录下载: 微信开放平台登录   支付宝登录   QQ登录  
二维码
微信扫一扫登录
下载资源需要15金贝
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
支付方式: 支付宝    微信支付   
验证码:   换一换

 
账号:
密码:
验证码:   换一换
  忘记密码?
    
1、金锄头文库是“C2C”交易模式,即卖家上传的文档直接由买家下载,本站只是中间服务平台,本站所有文档下载所得的收益全部归上传人(卖家)所有,作为网络服务商,若您的权利被侵害请及时联系右侧客服;
2、如你看到网页展示的文档有jinchutou.com水印,是因预览和防盗链等技术需要对部份页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有jinchutou.com水印标识,下载后原文更清晰;
3、所有的PPT和DOC文档都被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;下载前须认真查看,确认无误后再购买;
4、文档大部份都是可以预览的,金锄头文库作为内容存储提供商,无法对各卖家所售文档的真实性、完整性、准确性以及专业性等问题提供审核和保证,请慎重购买;
5、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据;
6、如果您还有什么不清楚的或需要我们协助,可以点击右侧栏的客服。
下载须知 | 常见问题汇总

网络编程技术实验指导书

网络编程技术实验指导书     董黎刚信息与电子工程学院浙江工商大学10/3/2006 2:24:00 PM Content1. Operation of Linux (操作性)11.1 Purpose11.2 Content11.3 Hints22. C Programming Practice(设计性)32.1 Purpose32.2 Content32.3 Grading33. Simple Socket Programming(验证性)43.1 Purpose43.2 Content43.3 Hints44. Concurrency Socket Programming(验证性)54.1 Purpose54.2 Content54.3 Hints55. Windows Socket Programming(验证性)65.1 Purpose65.2 Content65.3 Hints66. Advanced Socket Programming (设计性)76.1 Purpose76.2 Content76.3 Grading8Experiments of Network Programming Last updated: 10/3/20061. Operation of Linux (操作性)Name: No.: Class: Grading:1.1 PurposeReview the operation of Linux, in particular shell commands (bash).1.2 ContentEach student is required to finish all of the following tasks. Part I Programming 1) Use “vi” to construct a program “helloworld.c” that can print“hello world”. Compile and run it. (hint: gcc helloworld.c, ./a.out)Part II File/Directory2) Make a new sub-directory in current directory, then move “helloworld.c” into this new sub-directory. (hint: mkdir source, mv old_file new_file)3) Change the access permissions of “helloworld.c” to -rw-r-xrw-. (hint:chmod 656 helloworld.c)4) Find a file named “emacs” in hard disk. (hint: find / -name emacs)5) Make a hard link, which is called “helloworld1.c”, of “helloworld.c”. (hint: ln old_file new_file); 6) Make a symbolic link, which is called “helloworld2.c”, of “helloworld1.c”. Then remove helloworld1.c. (hint: ln s old_file new_file) Check the output of “ls l” to compare the hard link and soft link.7) Make a copy of “helloworld.c”. The new file is “helloworld3.c”. (hint: cp source_file destination_file) 8) Archive and compress all the files inside a sub-directory. (hint: tar cvf new_file.tar  *, gzip old_file)Part III Text9) Show the first 10 line of helloworld.c in reverse order. (hint: head helloworld.c | sort -r)10) Print the number of bytes, words, and lines of helloworld.c to a file called “info.txt”. (hint: wc helloworld.c > info.txt)11) Merge helloworld.c and info.txt to a new file “helloworld.txt”. (hint: paste helloworld.c info.txt > helloworld.txt)12) Print column 3-5 of “helloworld.c”. (hint: cut c3-5 helloworld.c)13) Remove “/home/your_name/source”. (hint: rmdir, rm)Part IV Process14) compare the difference among “ps”, “ps f”, and “ps ef”. 15) execute “top” to show the most active processes.Part V I/O Devices 16) Find the free space size in hard disks and usage size of /usr/src. (hint: du, df)Part VI Networking17) Find the IP address of the local host. (hint: ifconfig)18) Change the IP address of the localhost. (hint: ifconfig eth0 192.168.2.2 up Or change /etc/sysconfig/network-scripts/ifcfg-eth0)Part VII System Management19) Find the version of Linux kernel and host name in the local host. (hint: uname a)20) Set a regular variable called “var1” and an environment variable “var2”. You can assigned any value. (hint: var1=10, export var2=3, 分别用set, env来查看)21) Find the memory and cpu usage information of this local host. (hint: cat /proc/cpuinfo, cat /proc/meminfo) 22) Find the .h file containing the definition of struct sockaddr_in in /usr/src/. (hint: grep  r  “struct sockaddr_in  ”  /usr/src/* )1.3 Hints1)      先理解命令的含义,再运行试验。如果你想了解是否有完成某项工作的命令,可以使用“apropos 关键词”;如果你想了解某个命令的细节(比如选项),可以使用“man ls”, “ls help” (以ls为例)。如果你想知道某个命令的文件在哪个目录里,可以使用“whereis ls”, “which ls” (以ls为例)。2)      命令执行完,要检查一下是否执行正确,比如用“ls l”检查是否产生了新的文件3)命令执行失败的常见错误有:a) 名字敲错;b) 命令和选项或执行对象之间没有空格;c)文件确实不在你所预想的那个目录里,这可以用“ls l”来检查;d)文件不在缺省路径里,你需要指定文件的路径。4) 用Ctrl-C强行退出正在运行的命令2. C Programming Practice(设计性)Name: No.: Class: Grading:2.1 PurposeReview the knowledge of C programming, in particular operation of structure, pointer, memory, file, etc. It is necessary before learning network programming.2.2 ContentEach student is required to construct a small information management program for managing student records (e.g, No., name, age, scores, hometown) with the following constraint.1) Use a binary file (NOT a text file) to store student records. 2) You can dynamically edit (e.g., add, remove, and show) student records. 3) You must use linked list(链表), pointer(指针), files(文件), structure(结构), dynamic allocation of space(动态分配空间).2.3 GradingContentDetailScore1.Function of programs(30)(1)记录用结构表示,至少包含字符串(如名字)和整型(如年龄)(5)(2)用链表来动态保存记录,并能以命令行或者菜单形式增加(5)、删除(5)和查询(5)内容。如果用数组最多得5分(3)用二进制文件永久保存记录,并能在程序开始运行时读取文件内容(5),在程序运行结束前保存到文件(5)2.Quality of programs(30%)(1)用大括号和缩进来清楚地显示程序结构。(提示:按一次"tab"键产生一个缩进)(5)(2)各函数有功能说明和参数说明(5)(3)每个源程序文件都有说明(比如本程序功能,作者,包含哪些函数)(5)(4)每个函数长度不超过100行(5)(5)函数、变量取名前后一致并容易理解(5)(6)对不容易理解的常量、

注意事项

本文(网络编程技术实验指导书)为本站会员(ni****g)主动上传,金锄头文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即阅读金锄头文库的“版权提示”【网址:https://www.jinchutou.com/h-59.html】,按提示上传提交保证函及证明材料,经审查核实后我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.