
yummy.bian at gmail
May 25, 2012, 2:25 AM
Post #1 of 1
(149 views)
Permalink
|
|
Could anyone know how to use pf_ring in general socket programming?
|
|
hi, In order to improve the performance of legacy code(reduce one copy). I just would like to modify them as less as possible, so i don't want to use function such as pfring_xxx. And how to create general TCP socket?I wrote one as show below,but it failed. fd = socket(PF_SOCK, SOCK_STREAM, htons(ETH_P_ALL)) It's ok If i use SOCK_RAW replace of SOCK_STREAM.Why? Besides of socket(), are three any function need to do some modification?
|