Hi Luca.
I worked according to your instructions.
mkdir /etc/pf_ring;
echo "36444442303930464134443643323130" > /etc/pf_ring/001B21BE8B94
echo "36373241313034443243374242423035" > /etc/pf_ring/001B21BE8B95
And
I test igb DNA driver.
Test results are follows.
RX: success.
TX: i used to packet transmission pfring_send function. (pfring_send(pd, buff, len, 0)
but pfring_send function results are always 1;
printf("len = [%d]\n", pfring_send(pd, buff, len, 0));
len = [1]
why?
===> packet ==> eth2 ===============> eth3 ======>
<============= eth2 <=============== eth3 <== packet <=====
in_pd = pfring_open(in_dev, 1, 1500, 0);
pfring_set_direction(in_pd, rx_and_tx_direction);
out_pd = pfring_open(out_dev, 1, 1500, 0);
pfring_set_direction(out_pd, rx_and_tx_direction);
pfring_enable_ring(in_pd);
pfring_enable_ring(out_pd);
while (1) {
if (pfring_recv(in_pd, &buffer, 0, &hdr, 0) > 0)
IndummyProcesssPacket(&hdr, buffer);
if (pfring_recv(out_pd, &buffer, 0, &hdr, 0) > 0)
OutdummyProcesssPacket(&hdr, buffer);
}
============================================================
IndummyProcesssPacket(const struct pfring_pkthdr *h, const u_char *p) {
printf("eth2 = [%d]\n", pfring_send(out_pd, (char *)p, h->caplen, 0));
}
OutdummyProcesssPacket(const struct pfring_pkthdr *h, const u_char *p) {
printf("eth3 = [%d]\n", pfring_send(in_pd, (char *)p, h->caplen, 0));
}
===============================================================
eth2 = [1]
eth3 = [1]
......
......
......
=========================================================================
please do:
mkdir /etc/pf_ring;
echo "36444442303930464134443643323130" > /etc/pf_ring/001B21BE8B94
echo "36373241313034443243374242423035" > /etc/pf_ring/001B21BE8B95
Note that this is pre-release code subject to change without notice, where not all features have been implemented. Please report us any bug you might encounter.
Luca
|