ddn.lib.pcap.types
Foundational types, constants, and utilities for the libpcap D binding.
This module defines basic types used throughout the library and provides cross-platform helpers and string conversion utilities.
License
Copyright
Types 19
BPF 32-bit signed integer.
BPF 32-bit unsigned integer.
Equivalent to C unsigned int.
Equivalent to C unsigned short.
Equivalent to C unsigned char.
Generic per-packet information, as supplied by libpcap.
timeval tsbpf_u_int32 caplenbpf_u_int32 lenStatistics as returned by pcap_stats().
u_int ps_recvu_int ps_dropu_int ps_ifdropItem in a list of interfaces.
pcap_if * nextchar * namechar * descriptionpcap_addr * addressesbpf_u_int32 flagsditto
Representation of an interface address.
pcap_addr * nextsockaddr * addrsockaddr * netmasksockaddr * broadaddrsockaddr * dstaddrditto
Header of a pcap savefile.
bpf_u_int32 magicu_short version_majoru_short version_minorbpf_int32 thiszonebpf_u_int32 sigfigsbpf_u_int32 snaplenbpf_u_int32 linktypeBPF instruction.
u_short codeu_char jtu_char jfbpf_u_int32 kBPF program.
u_int bf_lenbpf_insn * bf_insnsEthernet entry.
u_char[6] addrchar[122] nameRemote authentication methods.
int typechar * usernamechar * passwordSampling methods.
int methodint valueWindows-specific: Send queue for pcap_sendqueue_transmit.
u_int maxlenu_int lenchar * bufferWindows-specific: Capture modes for pcap_setmode.
Functions 3
string fromCString(const(char) * cstr) pure nothrowConverts a null-terminated C string to a D string (copying the data).const(char) * toOwnedCString(string s) nothrowConverts a D string to a null-terminated C string backed by owned GC memory.Variables 6
PCAP_ERRBUF_SIZE = 256Size of the buffer used by libpcap for error messages.
PCAP_BUF_SIZE = 1024The maximum buffer size in which address, port, interface names are kept.
PCAP_NETMASK_UNKNOWN = 0xffffffffValue used to indicate an unknown netmask.
IS_WINDOWS = { version (Windows)
return true; else
return false; }()Platform identification constants.
IS_POSIX = { version (Posix)
return true; else
return false; }()ditto
IS_LINUX = { version (linux)
return true; else
return false; }()ditto