📄 pfopen.3
字号:
.\" SCCSID: @(#)pfopen.3 3.2 6/2/88.TH pfopen 3.SH Namepfopen \- open a packet filter file.SH Syntax.B pfopen(ifname, flags).br.B char *ifname;.br.B int flags;.SH Description.NXR "packetfilter" "pfopen subroutine" .NXR "pfopen subroutine"The packet filter (see.MS packetfilter 4 )provides raw access to Ethernets and similar network data link layers.The routine .PN pfopenis used to open a packet filter file descriptor. The routine hides variousdetails about the way packet filter files are opened and named..PPThe.I ifnameargument is a pointer to a null-terminated string containing the nameof the interface for which the application is opening the packet filter.This name may be the name of an actual interface on the system(for example, ``de0'', ``qe2'') or it may be a pseudo-interface name of theform.RI ``pf n '',used to specify the.IR n thinterface attached to the system. For example, ``pf0'' specifies thefirst such interface. If.I ifnameis NULL, the default interface (``pf0'') is used..PPThe.I flagsargument has the same meaning as the corresponding argument to the.MS open 2system call..PPThe file descriptor returned by.PN pfopenis otherwise identical to one returned by.MS open 2 ..SH DiagnosticsThe.PN pfopenroutine returns a negative integer if the file could not be opened.This may be because of resource limitations, or because the specifiedinterface does not exist..PPIf there are a lot of packet filter applications in use, the .PN pfopenroutine might take a while..SH See Alsoopen(2), packetfilter(4).br.I "The Packet Filter: An Efficient Mechanism for User Level Network Code"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -