hi Alfredo:
          I still have a little question. I know the function of "int 
pfring_mod_open_setup(pfring *ring)"
is called by "pfringt_opne", and the function of "int pfring_mod_open_setup(pfring 
*ring)" call the function of "mmap".
#########################################
  ring->buffer = (char *)mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE,
                                MAP_SHARED, ring->fd, 0);
#########################################
But this mmap has 6 parameters,the function of "ring_mmap" just has 3 
parameters.
#########################################
 static int ring_mmap(struct file *file,
                      struct socket *sock, struct vm_area_struct *vma)
#########################################
So this is confused me? How to understand it?
Thank you.

在 2014/8/11 9:19, lxgeek 写道:
Thank you.

在 2014/8/10 17:14, Alfredo Cardigliano 写道:
> ring_mmap() is called when the process calls mmap() on the pf_ring
> socket to map memory from kernel space,
> it usually happens inside pfring_open().
>
> Alfredo
>
> On 10 Aug 2014, at 05:43, lx <[email protected]> wrote:
>
> > hi all:
> >         I'm a new one. I want to know when and where the function of
> "ringt_mmap" is called?
> > #######################################
> > static int ring_mmap(struct file *file,
> >              struct socket *sock, struct vm_area_struct *vma)
> > #######################################
> >  From kernel/pf_ring.c
> >
> > Thank you.
> > _______________________________________________
> > Ntop-misc mailing list
> > [email protected]
> > http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>


_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to