JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Programming Interfaces Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Memory and CPU Management

2.  Session Description Protocol API

3.  Process Scheduler

4.  Locality Group APIs

5.  Input/Output Interfaces

6.  Interprocess Communication

7.  Socket Interfaces

8.  Programming With XTI and TLI

9.  Packet Filtering Hooks

Packet Filtering Hooks Interfaces

Packet Filtering Hooks Kernel Functions

Packet Filtering Hooks Data Types

Using the Packet Filtering Hooks Interfaces

IP Instances

Protocol Registration

Event Registration

The Packet Hook

Packet Filtering Hooks Example

10.  Transport Selection and Name-to-Address Mapping

11.  Real-time Programming and Administration

12.  The Oracle Solaris ABI and ABI Tools

A.  UNIX Domain Sockets

Index

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 functions will be correctly loaded by the kernel.

hook_alloc(9F)

Allocate a hook_t data structure.

hook_free(9F)

Free a hook_t structure that was originally allocated by hook_alloc().

net_event_notify_register(9F)

Register a function to be called when there is a change to a specified event.

net_event_notify_unregister(9F)

Indicate that there is no longer any desire to receive notification of changes to the specified event through calls to the specified callback function.

net_getifname(9F)

Retrieve the name given to the specified network interface.

net_getlifaddr(9F)

Retrieve the network address information for each specified logical interface.

net_getmtu(9F)

Retrieve information about the current MTU of the specified network interface.

net_getpmtuenabled(9F)

Indicate whether path MTU (PMTU) discovery is enabled for the specified network protocol.

net_hook_register(9F)

Add a hook that allows callbacks to be registered with events that belong to the specified network protocol.

net_hook_unregister(9F)

Disable callback hooks that were registered with net_hook_register().

net_inject(9F)

Deliver network layer packets either into the kernel or onto the network.

net_inject_alloc(9F)

Allocate a net_inject_t structure.

net_inject_free(9F)

Free a net_inject_t structure that was originally allocated by net_inject_alloc().

net_instance_alloc(9F)

Allocate a net_instance_t structure.

net_instance_free(9F)

Free a net_instance_t structure that was originally allocated by net_instance_alloc().

net_instance_notify_register(9F)

Register the specified function to be called when there is a new instance added to or removed from the specified network instance.

net_instance_notify_unregister(9F)

Indicate that there is no longer any desire to receive notification of changes to the specified instance through calls to the specified callback function.

net_instance_register(9F)

Record the set of functions to be called when an event related to IP instance maintenance occurs.

net_instance_unregister(9F)

Remove the set of instances that were previously registered with net_instance_register().

net_ispartialchecksum(9F)

Indicates whether the specified packet contains headers with only partial checksum values.

net_isvalidchecksum(9F)

Verify the layer 3 checksum and, in some cases, the layer 4 checksum in the specified packet.

net_kstat_create(9F)

Allocate and initialize a new kstat(9S) structure for the specified instance of IP.

net_kstat_delete(9F)

Remove a kstat for the specified instance of IP from the system.

net_lifgetnext(9F)

Search all of the logical interfaces that are associated with a physical network interface.

net_phygetnext(9F)

Search all of the network interfaces that a network protocol “owns.”

net_phylookup(9F)

Attempt to retrieve the specified interface name for a network protocol.

net_protocol_lookup(9F)

Locate an implementation of a network layer protocol.

net_protocol_notify_register(9F)

Register the specified function to be called when there is a change to the specified protocol.

net_protocol_notify_unregister(9F)

Remove the specified function from the list of functions to call.

net_protocol_release(9F)

Indicate that a reference to the specified network protocol is no longer required.

net_routeto(9F)

Indicate which network interface packets are sent.

Packet Filtering Hooks Data Types

The following types support the functions described above.

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 to 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.