从https://rohc-lib.org/下载了ROHC的库,参考http://blog.csdn.net/u013793399/article/details/51426548#reply的教程完成了安装,其中安装libpcap的时候去找了一下教程,因为安装libpcap的时候还需要几个其他的库支持,这个教程很好找。
在安装cmocka的时候,参考INSTALL文件中的方法,在上面引用的教程中最后要添加一步make install。
在安装rohc的时候建议安装在usr中,不然后患无穷啊。。。。。
全部安装完毕,可以去rohc-lib网站上去看一下Getting started,vim 一个小C文件,将代码粘进去
/* includes required to create a fake IP packet */
#include
/* for the IPv4 header */
#include
/* for strlen() */
#include
/* for the rohc_buf_*() functions */
/* The size (in bytes) of the buffers used in the p