Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1983, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)imp.4 6.5 (Berkeley) 3/28/91 | |
33 | .\" | |
34 | .Dd March 28, 1991 | |
35 | .Dt IMP 4 | |
36 | .Os BSD 4.2 | |
37 | .Sh NAME | |
38 | .Nm imp | |
39 | .Nd | |
40 | .Tn IMP | |
41 | raw socket interface | |
42 | .Sh SYNOPSIS | |
43 | .Fd #include <sys/socket.h> | |
44 | .Fd #include <netinet/in.h> | |
45 | .Fd #include <netimp/if_imp.h> | |
46 | .Ft int | |
47 | .Fn socket AF_IMPLINK SOCK_RAW proto | |
48 | .Sh DESCRIPTION | |
49 | The raw imp socket provides direct access to the | |
50 | .Nm imp | |
51 | network interface. Users send packets through | |
52 | the interface using the | |
53 | .Xr send 2 | |
54 | calls, and receive packets with the | |
55 | .Xr recv 2 , | |
56 | calls. All outgoing packets must have an 1822 96-bit | |
57 | leader on the front. Likewise, packets received | |
58 | by the user will have this leader on the front. The | |
59 | 1822 leader and the legal values for the various fields | |
60 | are defined in the include file | |
61 | .Aq Pa netimp/if_imp.h . | |
62 | The raw imp interface automatically installs the length | |
63 | and destination address in the 1822 leader of all | |
64 | outgoing packets; these need not be filled in by the user. | |
65 | .Pp | |
66 | If the protocol selected, | |
67 | .Fa proto , | |
68 | is zero, | |
69 | the socket will receive | |
70 | all | |
71 | .Tn IMP | |
72 | messages except RFNM and incompletes | |
73 | which are not input data for a kernel protocol. | |
74 | If | |
75 | .Fa proto | |
76 | is non-zero, | |
77 | only messages for the specified link type will be received. | |
78 | .Sh DIAGNOSTICS | |
79 | An operation on a socket may fail with one of the following | |
80 | errors: | |
81 | .Bl -tag -width [EADDRNOTAVAIL] | |
82 | .It Bq Er EISCONN | |
83 | when trying to establish a connection on a socket which | |
84 | already has one, or when trying to send a datagram with the destination | |
85 | address specified and the socket is already connected; | |
86 | .It Bq Er ENOTCONN | |
87 | when trying to send a datagram, but | |
88 | no destination address is specified, and the socket hasn't been | |
89 | connected; | |
90 | .It Bq Er ENOBUFS | |
91 | when the system runs out of memory for | |
92 | an internal data structure; | |
93 | .It Bq Er ENOBUFS | |
94 | eight messages to the destination host are outstanding, | |
95 | and another eight are already queued for output; | |
96 | .It Bq Er EADDRNOTAVAIL | |
97 | when an attempt is made to create a | |
98 | socket with a network address for which no network interface | |
99 | exists. | |
100 | .El | |
101 | .Sh SEE ALSO | |
102 | .Xr intro 4 , | |
103 | .Xr inet 4 , | |
104 | .Xr imp 4 | |
105 | .Sh HISTORY | |
106 | The | |
107 | .Nm | |
108 | driver appeared in | |
109 | .Bx 4.2 . |