万卷书   首页 > 电脑书籍 > Linux >Wrapper和xinetd的实现(三)
 

3 .echo的配置

【范例3.1】?????o??="COLOR: white; FONT-FAMILY: Arial">/etc/xinetd.d/echo

# default: off

# description: An echo server. This is the tcp \

# version.

service echo

{

       disable   = yes

       type              = INTERNAL

       id           = echo-stream

??捳楲瑰>?????o??

       socket_type  = stream

       protocol = tcp

       user              = root

       wait        = no

}

【范例3.2】/etc/xinetd.d/echo-udp

# default: off

# description: An echo server. This is the udp \

# version.

service echo

{

       disable   = yes

       type              = INTERNAL UNLISTED

       id           = echo-dgram

       socket_type  = dgram

       protocol = udp

       user              = root

       wait        = yes

       port        = 7

}


解读:由于它们的服务名相同,只是socket类型不同,所以,使用id属性来区分。

上一页 下一页