[linux内核][网络编程] tipc-pip工具的使用

前言:

tipc-pip是一个tipc网络管理工具,可以用来观察tipc组网情况和其他详细信息

 

正文:

格式未整理,需要使用的自行整理

---------------------------------------------           例子            -----------------------------------------------
---------------------------------------------TIPC模块测试用例
server:   ./tipcTS
client:      ./tipcTC 0
---------------------------------------------TIPC模块测试用例

---------------------------------------------自测用例
===========多播通讯=============
node1
tipc-pipe -l --sock_type=SOCK_RDM --addr_type=TIPC_ADDR_MCAST 1 100
node2
tipc-pipe -l --sock_type=SOCK_RDM --addr_type=TIPC_ADDR_MCAST 1 100

=============unicast通讯1=============
node1(server)(name seq)
tipc-pipe -l --addr_type=TIPC_ADDR_NAMESEQ 1 100
node2(client)
tipc-pipe --addr_type=TIPC_ADDR_NAME 55

=============unicast通讯2=============
node1(server)(name)
tipc-pipe -l --addr_type=TIPC_ADDR_NAME 55
node2(client)
tipc-pipe --addr_type=TIPC_ADDR_NAME 55
---------------------------------------------自测用例

---------------------------------------------           详细手册            -----------------------------------------------
Usage:
       tipc-pipe <options> [address 1] [address 2]
        
default address 1 is 0 
default address 2 is same as address 1

options:

(下面的每一项配置,如果是多个可选值,那么其中带*号的是默认值)
default values are marked with '*'

       -h | --help
               show this help
---------------------------------------------------------------------------------------作为什么角色
       -l      作为服务器,接受多连接
               (run in server mode, accept multiple connections)
       -s      作为服务器,只接受一个连接,连接关闭则进程结束
               (run in single connection server mode, exit on connection close)

               不标明-l或者-s,那么就作为客户端运行
       default mode is client mode
---------------------------------------------------------------------------------------作为什么角色

---------------------------------------------------------------------------------------
       --sock_type *SOCK_STREAM | SOCK_DGRAM | SOCK_RDM | SOCK_SEQPACKET     

?       --server_type *1000|<n>

?       --addr_type TIPC_ADDR_NAMESEQ | TIPC_ADDR_MCAST | *TIPC_ADDR_NAME
               For TIPC_ADDR_NAME only address 1 is used.
               For TIPC_ADDR_NAMESEQ or TIPC_ADDR_MCAST
               address 1 and address 2 are used.

?       --delay *0|<ms>
                以毫秒为单位定义数据的读写延时
               (Defines data reading and writing delay in ms.)

?       --data_num *0|<count>
                要发送的样本数据的个数
               (Generates defined number of sample data and sends is.)

?       --data_size *0
                需要先定义data_num,这个参数表示每个包的大小
               (Generates packets of defined size when data_num is defined.)

?       --data_check
               Check sequence numbers in received data,
               generated with option data_num.

       --buf_size *66000|<n> 
               I/O buffer size (see TIPC_MAX_USER_MSG_SIZE).
       --wait_peer *0
               Wait for peer published state before communication.
       --top
               run topology client
       --replay
               force connectionless server send input to last connected client 

shortcuts:

       --rdm
               sock_type = SOCK_RDM
       --pct
               sock_type = SOCK_PACKET
       --stm
               * sock_type = SOCK_STREAM
       --sqp
               sock_type = SOCK_SEQPACKET
       --nam
               * addr_type = TIPC_ADDR_NAME
       --mc
               addr_type = TIPC_ADDR_MCAST or TIPC_ADDR_NAMESEQ
       --id
               addr_type = TIPC_ADDR_ID
Samples:

SOCK_STREAM single connection server with address zero and client:

       tipc-pipe -s | tee input

       date | tipc-pipe

SOCK_RDM server with address 123 and client:

       tipc-pipe --rdm --replay -l 123

       tipc-pipe --rdm 123

Start topology client for all addresses of specified optional server type

tipc-pipe --server_type=1000 --top -- 0 -1

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值