File: pcap_findalldevs.ml

package info (click to toggle)
mlpcap 0.9-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,008 kB
  • ctags: 60
  • sloc: sh: 5,903; ansic: 142; ml: 94; makefile: 55
file content (9 lines) | stat: -rw-r--r-- 210 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
open Pcap

let ethdevs = pcap_findalldevs ();;

Printf.printf "Available interfaces:\n";;
for i = 0 to (Array.length ethdevs)-1 do
        let aa = Printf.printf "%s\n" ethdevs.(i).name in flush_all ()
done;;