8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / man / man9s / net_instance_t.9s
blob4f4b143276ff44e2758697245af16d007052f3ff
1 '\" te
2 .\"  Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved
3 .\"  Copyright (c) 2012 Joyent, Inc. All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH NET_INSTANCE_T 9S "Mar 5, 2012"
8 .SH NAME
9 net_instance_t \- packet event structure passed through to hooks
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/neti.h>
14 .fi
16 .SH INTERFACE LEVEL
17 .sp
18 .LP
19 Solaris DDI specific (Solaris DDI).
20 .SH DESCRIPTION
21 .sp
22 .LP
23 The \fBnet_instance_t\fR data structure defines a collection of instances to be
24 called when relevant events happen within \fBIP\fR. The value returned by the
25 \fBnin_create()\fR function is stored internally and passed back to both the
26 \fBnin_destroy()\fR and \fBnin_shutdown()\fR functions as the second argument.
27 The \fBnetid_t\fR passed through to each function can be used to uniquely
28 identify each instance of \fBIP\fR.
29 .SH STRUCTURE MEMBERS
30 .sp
31 .in +2
32 .nf
33     char    *nin_name;
34      void    *(*nin_create)(const netid_t);
35      void    (*nin_destroy)(const netid_t, void *);
36      void    (*nin_shutdown)(const netid_t, void *);
37 .fi
38 .in -2
40 .sp
41 .ne 2
42 .na
43 \fB\fBnin_name\fR\fR
44 .ad
45 .RS 16n
46 Name of the owner of the instance.
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fBnin_create\fR\fR
53 .ad
54 .RS 16n
55 Function to be called when a new instance of \fBIP\fR is created. It may not
56 return \fBNULL\fR.
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fBnin_destroy\fR\fR
63 .ad
64 .RS 16n
65 Function to be called when an instance of \fBIP\fR is being destroyed.
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fBnin_shutdown\fR\fR
72 .ad
73 .RS 16n
74 Function to be called when an instance of \fBIP\fR is being shutdown.
75 \fBnin_shutdown()\fR is called before \fBnin_destroy()\fR is called.
76 .RE
78 .SH ATTRIBUTES
79 .sp
80 .LP
81 See \fBattributes\fR(5) for descriptions of the following attributes:
82 .sp
84 .sp
85 .TS
86 box;
87 c | c
88 l | l .
89 ATTRIBUTE TYPE  ATTRIBUTE VALUE
91 Interface Stability     Committed
92 .TE
94 .SH SEE ALSO
95 .sp
96 .LP
97 \fBnetinfo\fR(9F), \fBattributes\fR(5)