Go to main content

Oracle® Solaris 11.3 Programming Interfaces Guide

Exit Print View

Updated: April 2019
 
 

Packet Filtering Hooks Interfaces

Packet filtering hooks interfaces include kernel functions and data type definitions.

Packet Filtering Hooks Kernel Functions

The packet filtering hooks kernel functions are exported from the misc/neti and misc/hook kernel modules to support packet filtering. To use these functions, link your kernel modules with –Nmisc/neti and –Nmisc/hook so that the kernel load the functions.

The following kernel functions support packet filtering:

hook_alloc

Allocate a hook_t data structure. For more information, see the hook_alloc(9F) man page.

hook_free

Free a hook_t structure that was allocated by hook_alloc(). For more information, see the hook_free(9F) man page.

net_event_notify_register

Register a function to be called when there is a change to a specified event. For more information, see the net_event_notify_register(9F) man page.

net_event_notify_unregister

Stop receiving the notification of changes to the specified event through calls to the specified callback function. For more information, see the net_event_notify_unregister(9F) man page.

net_getifname

Retrieve the name given to the specified network interface. For more information, see the net_getifname(9F) man page.

net_getlifaddr

Retrieve the network address information for each specified logical interface. For more information, see the net_getlifaddr(9F) man page.

net_getmtu

Retrieve information about the current MTU of the specified network interface. For more information, see the net_getmtu(9F) man page.

net_getpmtuenabled

Indicate whether path MTU (PMTU) discovery is enabled for the specified network protocol. For more information, see the net_getpmtuenabled(9F) man page.

net_hook_register(9F)

Add a hook that allows callbacks to be registered with events that belong to the specified network protocol. For more information, see the net_hook_register(9F) man page.

net_hook_unregister(9F)

Disable callback hooks that were registered with net_hook_register(). For more information, see the net_hook_register(9F) man page.

net_inject

Deliver network layer packets either into the kernel or onto the network. For more information, see the net_inject(9F) man page.

net_inject_alloc

Allocate a net_inject_t structure. For more information, see the net_inject_alloc(9F) man page.

net_inject_free

Free a net_inject_t structure that was allocated by net_inject_alloc(). For more information, see the net_inject_free(9F) man page.

net_instance_alloc

Allocate a net_instance_t structure. For more information, see the net_instance_alloc(9F) man page.

net_instance_free

Free a net_instance_t structure that was allocated by net_instance_alloc(). For more information, see the net_instance_free(9F) man page.

net_instance_notify_register

Register the specified function to be called when there is a new instance added to or removed from the specified network instance. For more information, see the net_instance_notify_register(9F) man page.

net_instance_notify_unregister

Stop receiving the notification of changes to the specified instance through calls to the specified callback function. For more information, see the net_instance_notify_unregister(9F) man page.

net_instance_register

Record the set of functions to be called when an event related to IP instance maintenance occurs. For more information, see the net_instance_register(9F) man page.

net_instance_unregister

Remove the set of instances that were registered with net_instance_register(). For more information, see the net_instance_unregister(9F) man page.

net_ispartialchecksum

Indicates whether the specified packet contains headers with only partial checksum values. For more information, see the net_ispartialchecksum(9F) man page.

net_isvalidchecksum

Verify the layer 3 checksum and, in some cases, the layer 4 checksum in the specified packet. For more information, see the net_isvalidchecksum(9F) man page.

net_kstat_create

Allocate and initialize a new kstat(9S) structure for the specified instance of IP. For more information, see the net_kstat_create(9F) man page.

net_kstat_delete

Remove a kstat for the specified instance of IP from the system. For more information, see the net_kstat_delete(9F) man page.

net_lifgetnext

Search all of the logical interfaces that are associated with a physical network interface. For more information, see the net_lifgetnext(9F) man page.

net_phygetnext

Search all of the network interfaces that a network protocol owns. For more information, see the net_phygetnext(9F) man page.

net_phylookup

Attempt to retrieve the specified interface name for a network protocol. For more information, see the net_phylookup(9F) man page.

net_protocol_lookup

Locate an implementation of a network layer protocol. For more information, see the net_protocol_lookup(9F) man page.

net_protocol_notify_register(9F)

Register the specified function to be called when there is a change to the specified protocol. For more information, see the net_protocol_notify_register(9F) man page.

net_protocol_release

Indicate that a reference to the specified network protocol is no longer required. For more information, see the net_protocol_release(9F) man page.

net_routeto

Indicate which network interface packets are sent. For more information, see the net_routeto(9F) man page.

Packet Filtering Hooks Data Types

The following data types support the kernel functions.

hook_t(9S)

A callback to be inserted into a networking event.

hook_nic_event(9S)

An event that has occurred and belongs to a network interface.

hook_pkt_event(9S)

A packet event structure passed through the hooks.

net_inject_t(9S)

Information about how to transmit a packet.

net_instance_t(9S)

A collection of instances to be called when relevant events happen within IP.