zoukankan      html  css  js  c++  java
  • 准备工作

    1.下载(UNIX® Network Programming Volume 1)源码
    2.阅读README
    提醒:很多初学者跟我一样静不下心来读E文的README。可README对我们搭建程序环境至关重要,一定要克服这种心里障碍。

    根据readme提示 进行下列操作
    1.   ./configure # try to figure out all implementation differences
          # 会在根目录生成相应的 Makefile,Make.defines,config.h 等重要文件
    2.   cd lib # build the basic library that all programs need
          make # use "gmake" everywhere on BSD/OS systems

    3.   cd ../libfree # continue building the basic library
          make

    4.   cd ../intro # build and test a basic client program
          make daytimetcpsrv
          sudo ./daytimetcpsrv #我的系统ubuntu并未打开端口13,可用sudo netstat -antup系统所打开的监听端口

    5.   make daytimetcpcli #另开一终端
          sudo ./daytimetcpcli 127.0.0.1
          #返回结果:
         Sat Mar 17 14:12:40 2012


    OK,准备工作已经完成。


    MORE DETAILS
    ============
    2. Go into the "lib/" directory and type "make". This builds the library
    "libunp.a" that is required by almost all of the programs. There may
    be compiler warnings (see NOTES below). This step is where you'll find
    all of your system's dependencies, and you must just update your cf/
    files from step 1, rerun "config" and do this step again.

    3. Go into the "libfree/" directory and type "make". This adds to the
    "libunp.a" library. The files in this directory do not #include
    the "unp.h" header, as people may want to use these functions
    independent of the book's examples.

  • 相关阅读:
    Angular 学习笔记(四)
    Angular 学习笔记(三)
    Angular 学习笔记(二)
    Angular 学习笔记(一)
    ettercap + driftnet 实现同网段下流量欺骗
    kali 下使用 arpspoof 实现断网攻击
    JavaScript 语句
    vscode配置git及码云
    区块链入门
    C#情怀与未来
  • 原文地址:https://www.cnblogs.com/polestar/p/2405554.html
Copyright © 2011-2022 走看看