@@ -105,7 +105,7 @@ <h2 class="title">Where to start</h2>
105
105
< h2 class ="title "> The list device instances routine (most generic case)</ h2 >
106
106
< div class ="entry ">
107
107
< p >
108
- The "list of device instances" routine takes, as arguments:
108
+ The "list device instances" routine takes, as arguments:
109
109
</ p >
110
110
< ul >
111
111
< li > a pointer to a < code > pcap_if_list_t</ code > ;</ li >
@@ -159,6 +159,13 @@ <h2 class="title">The list device instances routine (most generic case)</h2>
159
159
message buffer has been filled in with an error string, and your
160
160
routine must return < code > PCAP_ERROR</ code > to indicate the error.
161
161
</ p >
162
+ < p >
163
+ If the module is the only module that is adding network interfaces
164
+ to the list of capture devices and it supports the "any"
165
+ pseudo-interface, the "list device instances" routine can call the
166
+ < b > pcapint_add_any_dev</ b > () routine to add the pseudo-interface to
167
+ the list.
168
+ </ p >
162
169
< p >
163
170
If your routine succeeds, it must return 0. If it fails, it must
164
171
fill in the error message buffer with an error string and return
@@ -546,7 +553,7 @@ <h2 class="title">The setfilter routine</h2>
546
553
< code > BPF_MOD</ code > or < code > BPF_XOR</ code > instructions—the
547
554
module should fall
548
555
back on filtering in userland by saving a copy of the filter with a
549
- call to < b > install_bpf_program </ b > (), setting a flag in the
556
+ call to < b > pcapint_install_bpf_program </ b > (), setting a flag in the
550
557
private data instructure indicating that filtering is being done by
551
558
the module and, in the read routine's main loop, checking the flag
552
559
and, if it's set, calling < b > pcapint_filter</ b > (),
@@ -557,7 +564,7 @@ <h2 class="title">The setfilter routine</h2>
557
564
< b > pcapint_filter</ b > () returns a non-zero value. (If the flag is not
558
565
set, all packets should be passed to the callback routine and
559
566
counted, as the filtering is being done by the mechanism used by the
560
- module.) If < b > install_bpf_program </ b > () returns a negative
567
+ module.) If < b > pcapint_install_bpf_program </ b > () returns a negative
561
568
value, the routine should return < code > PCAP_ERROR</ code > .
562
569
</ p >
563
570
< p >
@@ -582,13 +589,13 @@ <h2 class="title">The setfilter routine</h2>
582
589
< p >
583
590
If the attempt to set the filter succeeded, or it failed because the
584
591
mechanism used by the module rejected it and the call to
585
- < b > install_bpf_program </ b > () succeeded, the routine should
592
+ < b > pcapint_install_bpf_program </ b > () succeeded, the routine should
586
593
return 0.
587
594
</ p >
588
595
< p >
589
596
If the mechanism the module uses doesn't support filtering, the
590
597
pointer to the setfilter routine can just be set to point to
591
- < b > install_bpf_program </ b > (); the module does not need a
598
+ < b > pcapint_install_bpf_program </ b > (); the module does not need a
592
599
routine of its own to handle that.
593
600
</ p >
594
601
</ div >
0 commit comments