Mailing List Archive

Sending using pfring_send()
Hi,




I Just did ..




pfring_open("eth0, eth1"...)..OK

pfring_set_direction(rx_and_tx_direction) .. OK (not sure if I actually needs this one)
pfring_set_socket_mode(send_and_recv_mode) ..OK


pfring_enable_ring() .. OK

pfring_recv(blocking) .. I'm getting packets from the interfaces




However,


When I try to send data using pfring_send() I'm getting -1.

Note that my little test is actually sending the same packet that was received from pfring_recv()

Not very smart but its just a test :)

Kernel module parameters : min_num_slots=65536 enable_tx_capture=0


What did I do wrong ?




And if it was sending successfully, through which interface would it be sending from?

Since I was open multiple interfaces using pfring_open()




10x

Eitan.
Re: Sending using pfring_send() [ In reply to ]
Hi Eitan
please note that you are opening 2 interfaces with pfring_open,
it seems that pfring_send() should send traffic to a single interface,
what is the expected behaviour in your application?

Alfredo

> On 8 Jul 2019, at 17:58, Eitan Michaelson <eitanm@me.com> wrote:
>
> Hi,
>
> I Just did ..
>
> pfring_open("eth0, eth1"...)..OK
> pfring_set_direction(rx_and_tx_direction) .. OK (not sure if I actually needs this one)
> pfring_set_socket_mode(send_and_recv_mode) ..OK
> pfring_enable_ring() .. OK
> pfring_recv(blocking) .. I'm getting packets from the interfaces
>
> However,
> When I try to send data using pfring_send() I'm getting -1.
> Note that my little test is actually sending the same packet that was received from pfring_recv()
> Not very smart but its just a test :)
> Kernel module parameters : min_num_slots=65536 enable_tx_capture=0
> What did I do wrong ?
>
> And if it was sending successfully, through which interface would it be sending from?
> Since I was open multiple interfaces using pfring_open()
>
> 10x
> Eitan.
>
>
>
>
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev@listgateway.unipi.it <mailto:Ntop-dev@listgateway.unipi.it>
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev <http://listgateway.unipi.it/mailman/listinfo/ntop-dev>
Re: Sending using pfring_send() [ In reply to ]
Hi Eitan
please note that you are opening 2 interfaces with pfring_open,
it seems that pfring_send() should send traffic to a single interface,
what is the expected behaviour in your application?

Alfredo

> On 8 Jul 2019, at 17:58, Eitan Michaelson <eitanm@me.com> wrote:
>
> Hi,
>
> I Just did ..
>
> pfring_open("eth0, eth1"...)..OK
> pfring_set_direction(rx_and_tx_direction) .. OK (not sure if I actually needs this one)
> pfring_set_socket_mode(send_and_recv_mode) ..OK
> pfring_enable_ring() .. OK
> pfring_recv(blocking) .. I'm getting packets from the interfaces
>
> However,
> When I try to send data using pfring_send() I'm getting -1.
> Note that my little test is actually sending the same packet that was received from pfring_recv()
> Not very smart but its just a test :)
> Kernel module parameters : min_num_slots=65536 enable_tx_capture=0
> What did I do wrong ?
>
> And if it was sending successfully, through which interface would it be sending from?
> Since I was open multiple interfaces using pfring_open()
>
> 10x
> Eitan.
>
>
>
>
> _______________________________________________
> Ntop-dev mailing list
> Ntop-dev@listgateway.unipi.it <mailto:Ntop-dev@listgateway.unipi.it>
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev <http://listgateway.unipi.it/mailman/listinfo/ntop-dev>