The filter in bpf was implemented by a pseudo machine , which consists of an accumulator , an index register , a scratch memory store , and an implicit program counter . bpf can be directly programmed via ioctl system call and the pseudo machine instruction set , it can also be programmed by using libpcap function library , which can access many kinds of packet capture facilities provided by oses ( bpf is the important one in them ) Bpf的過濾器是由假想的過濾器虛擬機實現(xiàn)的,對bpf的編程,可以通過ioctl系統(tǒng)調(diào)用和過濾器虛擬機的指令集來直接編程,也可以通過libpcap提供的庫函數(shù)來編程,它能訪問許多種操作系統(tǒng)內(nèi)核提供的包過濾設(shè)施( bpf是其中重要的一種) 。