调试inetd,用来了解inetd的源代码

root@ch-Founder-PC:~/inetutils-1.9.4/src# ./inetd -d
Using pid-file at "/var/run/inetd.pid".
/etc/inetd.conf:32: ADD : *:tftp proto=udp, wait=1, max=0, user=nobody group= builtin=no server=/usr/sbin/tcpd
registered /usr/sbin/tcpd on 4
inetd: /etc/inetd.d, No such file or directory
someone wants tftp
+ Closing from 4
4549 execl /usr/sbin/tcpd
4549 reaped, status 0
restored tftp, fd 4

someone wants tftp
+ Closing from 4



下面是inetd.conf的文件内容

tftp        dgram    udp    wait    nobody    /usr/sbin/tcpd    /usr/sbin/tftpd -l /home/ch/tftpboot


someone wants tftp
+ Closing from 4
4549 execl /usr/sbin/tcpd
4549 reaped, status 0
restored tftp, fd 4


对应的另一个窗口的内容是:

root@ch-Founder-PC:~# tftp 172.22.24.150
tftp> get test
Received 22 bytes in 0.0 seconds
tftp> q
root@ch-Founder-PC:~#

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值