~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to linux-user/socket.h

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
#if defined(TARGET_MIPS)
3
 
        // MIPS special values for constants
4
 
 
5
 
        /*
6
 
         * For setsockopt(2)
7
 
         *
8
 
         * This defines are ABI conformant as far as Linux supports these ...
9
 
         */
10
 
        #define TARGET_SOL_SOCKET      0xffff
11
 
 
12
 
        #define TARGET_SO_DEBUG        0x0001  /* Record debugging information.  */
13
 
        #define TARGET_SO_REUSEADDR    0x0004  /* Allow reuse of local addresses.  */
14
 
        #define TARGET_SO_KEEPALIVE    0x0008  /* Keep connections alive and send
15
 
                                          SIGPIPE when they die.  */
16
 
        #define TARGET_SO_DONTROUTE    0x0010  /* Don't do local routing.  */
17
 
        #define TARGET_SO_BROADCAST    0x0020  /* Allow transmission of
18
 
                                          broadcast messages.  */
19
 
        #define TARGET_SO_LINGER       0x0080  /* Block on close of a reliable
20
 
                                          socket to transmit pending data.  */
21
 
        #define TARGET_SO_OOBINLINE 0x0100     /* Receive out-of-band data in-band.  */
22
 
        #if 0
23
 
        To add: #define TARGET_SO_REUSEPORT 0x0200     /* Allow local address and port reuse.  */
24
 
        #endif
25
 
 
26
 
        #define TARGET_SO_TYPE         0x1008  /* Compatible name for SO_STYLE.  */
27
 
        #define TARGET_SO_STYLE        SO_TYPE /* Synonym */
28
 
        #define TARGET_SO_ERROR        0x1007  /* get error status and clear */
29
 
        #define TARGET_SO_SNDBUF       0x1001  /* Send buffer size. */
30
 
        #define TARGET_SO_RCVBUF       0x1002  /* Receive buffer. */
31
 
        #define TARGET_SO_SNDLOWAT     0x1003  /* send low-water mark */
32
 
        #define TARGET_SO_RCVLOWAT     0x1004  /* receive low-water mark */
33
 
        #define TARGET_SO_SNDTIMEO     0x1005  /* send timeout */
34
 
        #define TARGET_SO_RCVTIMEO     0x1006  /* receive timeout */
35
 
        #define TARGET_SO_ACCEPTCONN   0x1009
36
 
 
37
 
        /* linux-specific, might as well be the same as on i386 */
38
 
        #define TARGET_SO_NO_CHECK     11
39
 
        #define TARGET_SO_PRIORITY     12
40
 
        #define TARGET_SO_BSDCOMPAT    14
41
 
 
42
 
        #define TARGET_SO_PASSCRED     17
43
 
        #define TARGET_SO_PEERCRED     18
44
 
 
45
 
        /* Security levels - as per NRL IPv6 - don't actually do anything */
46
 
        #define TARGET_SO_SECURITY_AUTHENTICATION              22
47
 
        #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT        23
48
 
        #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK          24
49
 
 
50
 
        #define TARGET_SO_BINDTODEVICE         25
51
 
 
52
 
        /* Socket filtering */
53
 
        #define TARGET_SO_ATTACH_FILTER        26
54
 
        #define TARGET_SO_DETACH_FILTER        27
55
 
 
56
 
        #define TARGET_SO_PEERNAME             28
57
 
        #define TARGET_SO_TIMESTAMP            29
58
 
        #define SCM_TIMESTAMP          SO_TIMESTAMP
59
 
 
60
 
        #define TARGET_SO_PEERSEC              30
61
 
        #define TARGET_SO_SNDBUFFORCE          31
62
 
        #define TARGET_SO_RCVBUFFORCE          33
63
 
 
64
 
        /** sock_type - Socket types
65
 
         *
66
 
         * Please notice that for binary compat reasons MIPS has to
67
 
         * override the enum sock_type in include/linux/net.h, so
68
 
         * we define ARCH_HAS_SOCKET_TYPES here.
69
 
         *
70
 
         * @SOCK_DGRAM - datagram (conn.less) socket
71
 
         * @SOCK_STREAM - stream (connection) socket
72
 
         * @SOCK_RAW - raw socket
73
 
         * @SOCK_RDM - reliably-delivered message
74
 
         * @SOCK_SEQPACKET - sequential packet socket
75
 
         * @SOCK_PACKET - linux specific way of getting packets at the dev level.
76
 
         *               For writing rarp and other similar things on the user level.
77
 
         */
78
 
        enum sock_type {
79
 
               TARGET_SOCK_DGRAM       = 1,
80
 
               TARGET_SOCK_STREAM      = 2,
81
 
               TARGET_SOCK_RAW = 3,
82
 
               TARGET_SOCK_RDM = 4,
83
 
               TARGET_SOCK_SEQPACKET   = 5,
84
 
               TARGET_SOCK_DCCP        = 6,
85
 
               TARGET_SOCK_PACKET      = 10,
86
 
        };
87
 
 
88
 
        #define TARGET_SOCK_MAX (SOCK_PACKET + 1)
 
3
    /* MIPS special values for constants */
 
4
 
 
5
    /*
 
6
     * For setsockopt(2)
 
7
     *
 
8
     * This defines are ABI conformant as far as Linux supports these ...
 
9
     */
 
10
    #define TARGET_SOL_SOCKET      0xffff
 
11
 
 
12
    #define TARGET_SO_DEBUG        0x0001  /* Record debugging information. */
 
13
    #define TARGET_SO_REUSEADDR    0x0004  /* Allow reuse of local addresses. */
 
14
    #define TARGET_SO_KEEPALIVE    0x0008  /* Keep connections alive and send
 
15
                                              SIGPIPE when they die. */
 
16
    #define TARGET_SO_DONTROUTE    0x0010  /* Don't do local routing. */
 
17
    #define TARGET_SO_BROADCAST    0x0020  /* Allow transmission of
 
18
                                              broadcast messages. */
 
19
    #define TARGET_SO_LINGER       0x0080  /* Block on close of a reliable
 
20
                                            * socket to transmit pending data.
 
21
                                            */
 
22
    #define TARGET_SO_OOBINLINE 0x0100     /* Receive out-of-band data in-band.
 
23
                                            */
 
24
    #if 0
 
25
    /* To add: Allow local address and port reuse. */
 
26
    #define TARGET_SO_REUSEPORT 0x0200
 
27
    #endif
 
28
 
 
29
    #define TARGET_SO_TYPE         0x1008  /* Compatible name for SO_STYLE. */
 
30
    #define TARGET_SO_STYLE        SO_TYPE /* Synonym */
 
31
    #define TARGET_SO_ERROR        0x1007  /* get error status and clear */
 
32
    #define TARGET_SO_SNDBUF       0x1001  /* Send buffer size. */
 
33
    #define TARGET_SO_RCVBUF       0x1002  /* Receive buffer. */
 
34
    #define TARGET_SO_SNDLOWAT     0x1003  /* send low-water mark */
 
35
    #define TARGET_SO_RCVLOWAT     0x1004  /* receive low-water mark */
 
36
    #define TARGET_SO_SNDTIMEO     0x1005  /* send timeout */
 
37
    #define TARGET_SO_RCVTIMEO     0x1006  /* receive timeout */
 
38
    #define TARGET_SO_ACCEPTCONN   0x1009
 
39
 
 
40
    /* linux-specific, might as well be the same as on i386 */
 
41
    #define TARGET_SO_NO_CHECK     11
 
42
    #define TARGET_SO_PRIORITY     12
 
43
    #define TARGET_SO_BSDCOMPAT    14
 
44
 
 
45
    #define TARGET_SO_PASSCRED     17
 
46
    #define TARGET_SO_PEERCRED     18
 
47
 
 
48
    /* Security levels - as per NRL IPv6 - don't actually do anything */
 
49
    #define TARGET_SO_SECURITY_AUTHENTICATION              22
 
50
    #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT        23
 
51
    #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK          24
 
52
 
 
53
    #define TARGET_SO_BINDTODEVICE         25
 
54
 
 
55
    /* Socket filtering */
 
56
    #define TARGET_SO_ATTACH_FILTER        26
 
57
    #define TARGET_SO_DETACH_FILTER        27
 
58
 
 
59
    #define TARGET_SO_PEERNAME             28
 
60
    #define TARGET_SO_TIMESTAMP            29
 
61
    #define SCM_TIMESTAMP          SO_TIMESTAMP
 
62
 
 
63
    #define TARGET_SO_PEERSEC              30
 
64
    #define TARGET_SO_SNDBUFFORCE          31
 
65
    #define TARGET_SO_RCVBUFFORCE          33
 
66
 
 
67
    /** sock_type - Socket types
 
68
     *
 
69
     * Please notice that for binary compat reasons MIPS has to
 
70
     * override the enum sock_type in include/linux/net.h, so
 
71
     * we define ARCH_HAS_SOCKET_TYPES here.
 
72
     *
 
73
     * @SOCK_DGRAM - datagram (conn.less) socket
 
74
     * @SOCK_STREAM - stream (connection) socket
 
75
     * @SOCK_RAW - raw socket
 
76
     * @SOCK_RDM - reliably-delivered message
 
77
     * @SOCK_SEQPACKET - sequential packet socket
 
78
     * @SOCK_DCCP - Datagram Congestion Control Protocol socket
 
79
     * @SOCK_PACKET - linux specific way of getting packets at the dev level.
 
80
     *                For writing rarp and other similar things on the user
 
81
     *                level.
 
82
     * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
 
83
     * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
 
84
     */
 
85
 
 
86
    #define ARCH_HAS_SOCKET_TYPES          1
 
87
 
 
88
    enum sock_type {
 
89
           TARGET_SOCK_DGRAM       = 1,
 
90
           TARGET_SOCK_STREAM      = 2,
 
91
           TARGET_SOCK_RAW         = 3,
 
92
           TARGET_SOCK_RDM         = 4,
 
93
           TARGET_SOCK_SEQPACKET   = 5,
 
94
           TARGET_SOCK_DCCP        = 6,
 
95
           TARGET_SOCK_PACKET      = 10,
 
96
           TARGET_SOCK_CLOEXEC     = 02000000,
 
97
           TARGET_SOCK_NONBLOCK    = 0200,
 
98
    };
 
99
 
 
100
    #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
 
101
    #define TARGET_SOCK_TYPE_MASK    0xf  /* Covers up to TARGET_SOCK_MAX-1. */
89
102
 
90
103
#elif defined(TARGET_ALPHA)
91
104
 
156
169
    /* Instruct lower device to use last 4-bytes of skb data as FCS */
157
170
    #define TARGET_SO_NOFCS     43
158
171
 
 
172
    /** sock_type - Socket types
 
173
     *
 
174
     * Please notice that for binary compat reasons ALPHA has to
 
175
     * override the enum sock_type in include/linux/net.h, so
 
176
     * we define ARCH_HAS_SOCKET_TYPES here.
 
177
     *
 
178
     * @SOCK_DGRAM - datagram (conn.less) socket
 
179
     * @SOCK_STREAM - stream (connection) socket
 
180
     * @SOCK_RAW - raw socket
 
181
     * @SOCK_RDM - reliably-delivered message
 
182
     * @SOCK_SEQPACKET - sequential packet socket
 
183
     * @SOCK_DCCP - Datagram Congestion Control Protocol socket
 
184
     * @SOCK_PACKET - linux specific way of getting packets at the dev level.
 
185
     *                For writing rarp and other similar things on the user
 
186
     *                level.
 
187
     * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
 
188
     * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
 
189
     */
 
190
 
 
191
    #define ARCH_HAS_SOCKET_TYPES          1
 
192
 
 
193
    enum sock_type {
 
194
           TARGET_SOCK_STREAM      = 1,
 
195
           TARGET_SOCK_DGRAM       = 2,
 
196
           TARGET_SOCK_RAW         = 3,
 
197
           TARGET_SOCK_RDM         = 4,
 
198
           TARGET_SOCK_SEQPACKET   = 5,
 
199
           TARGET_SOCK_DCCP        = 6,
 
200
           TARGET_SOCK_PACKET      = 10,
 
201
           TARGET_SOCK_CLOEXEC     = 010000000,
 
202
           TARGET_SOCK_NONBLOCK    = 010000000000,
 
203
    };
 
204
 
 
205
    #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
 
206
    #define TARGET_SOCK_TYPE_MASK    0xf  /* Covers up to TARGET_SOCK_MAX-1. */
159
207
#else
160
208
 
161
 
        /* For setsockopt(2) */
162
 
        #define TARGET_SOL_SOCKET      1
163
 
 
164
 
        #define TARGET_SO_DEBUG        1
165
 
        #define TARGET_SO_REUSEADDR    2
166
 
        #define TARGET_SO_TYPE         3
167
 
        #define TARGET_SO_ERROR        4
168
 
        #define TARGET_SO_DONTROUTE    5
169
 
        #define TARGET_SO_BROADCAST    6
170
 
        #define TARGET_SO_SNDBUF       7
171
 
        #define TARGET_SO_RCVBUF       8
172
 
        #define TARGET_SO_SNDBUFFORCE  32
173
 
        #define TARGET_SO_RCVBUFFORCE  33
174
 
        #define TARGET_SO_KEEPALIVE    9
175
 
        #define TARGET_SO_OOBINLINE    10
176
 
        #define TARGET_SO_NO_CHECK     11
177
 
        #define TARGET_SO_PRIORITY     12
178
 
        #define TARGET_SO_LINGER       13
179
 
        #define TARGET_SO_BSDCOMPAT    14
180
 
        /* To add :#define TARGET_SO_REUSEPORT 15 */
 
209
#if defined(TARGET_SPARC)
 
210
    /** sock_type - Socket types
 
211
     *
 
212
     * Please notice that for binary compat reasons SPARC has to
 
213
     * override the enum sock_type in include/linux/net.h, so
 
214
     * we define ARCH_HAS_SOCKET_TYPES here.
 
215
     *
 
216
     * @SOCK_DGRAM - datagram (conn.less) socket
 
217
     * @SOCK_STREAM - stream (connection) socket
 
218
     * @SOCK_RAW - raw socket
 
219
     * @SOCK_RDM - reliably-delivered message
 
220
     * @SOCK_SEQPACKET - sequential packet socket
 
221
     * @SOCK_DCCP - Datagram Congestion Control Protocol socket
 
222
     * @SOCK_PACKET - linux specific way of getting packets at the dev level.
 
223
     *                For writing rarp and other similar things on the user
 
224
     *                level.
 
225
     * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
 
226
     * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
 
227
     */
 
228
 
 
229
    #define ARCH_HAS_SOCKET_TYPES          1
 
230
 
 
231
    enum sock_type {
 
232
           TARGET_SOCK_STREAM      = 1,
 
233
           TARGET_SOCK_DGRAM       = 2,
 
234
           TARGET_SOCK_RAW         = 3,
 
235
           TARGET_SOCK_RDM         = 4,
 
236
           TARGET_SOCK_SEQPACKET   = 5,
 
237
           TARGET_SOCK_DCCP        = 6,
 
238
           TARGET_SOCK_PACKET      = 10,
 
239
           TARGET_SOCK_CLOEXEC     = 020000000,
 
240
           TARGET_SOCK_NONBLOCK    = 040000,
 
241
    };
 
242
 
 
243
    #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
 
244
    #define TARGET_SOCK_TYPE_MASK    0xf  /* Covers up to TARGET_SOCK_MAX-1. */
 
245
#endif
 
246
 
 
247
    /* For setsockopt(2) */
 
248
    #define TARGET_SOL_SOCKET      1
 
249
 
 
250
    #define TARGET_SO_DEBUG        1
 
251
    #define TARGET_SO_REUSEADDR    2
 
252
    #define TARGET_SO_TYPE         3
 
253
    #define TARGET_SO_ERROR        4
 
254
    #define TARGET_SO_DONTROUTE    5
 
255
    #define TARGET_SO_BROADCAST    6
 
256
    #define TARGET_SO_SNDBUF       7
 
257
    #define TARGET_SO_RCVBUF       8
 
258
    #define TARGET_SO_SNDBUFFORCE  32
 
259
    #define TARGET_SO_RCVBUFFORCE  33
 
260
    #define TARGET_SO_KEEPALIVE    9
 
261
    #define TARGET_SO_OOBINLINE    10
 
262
    #define TARGET_SO_NO_CHECK     11
 
263
    #define TARGET_SO_PRIORITY     12
 
264
    #define TARGET_SO_LINGER       13
 
265
    #define TARGET_SO_BSDCOMPAT    14
 
266
    /* To add :#define TARGET_SO_REUSEPORT 15 */
181
267
#if defined(TARGET_PPC)
182
 
        #define TARGET_SO_RCVLOWAT     16
183
 
        #define TARGET_SO_SNDLOWAT     17
184
 
        #define TARGET_SO_RCVTIMEO     18
185
 
        #define TARGET_SO_SNDTIMEO     19
186
 
        #define TARGET_SO_PASSCRED     20
187
 
        #define TARGET_SO_PEERCRED     21
 
268
    #define TARGET_SO_RCVLOWAT     16
 
269
    #define TARGET_SO_SNDLOWAT     17
 
270
    #define TARGET_SO_RCVTIMEO     18
 
271
    #define TARGET_SO_SNDTIMEO     19
 
272
    #define TARGET_SO_PASSCRED     20
 
273
    #define TARGET_SO_PEERCRED     21
188
274
#else
189
 
        #define TARGET_SO_PASSCRED     16
190
 
        #define TARGET_SO_PEERCRED     17
191
 
        #define TARGET_SO_RCVLOWAT     18
192
 
        #define TARGET_SO_SNDLOWAT     19
193
 
        #define TARGET_SO_RCVTIMEO     20
194
 
        #define TARGET_SO_SNDTIMEO     21
195
 
#endif
196
 
 
197
 
        /* Security levels - as per NRL IPv6 - don't actually do anything */
198
 
        #define TARGET_SO_SECURITY_AUTHENTICATION              22
199
 
        #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT        23
200
 
        #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK          24
201
 
 
202
 
        #define TARGET_SO_BINDTODEVICE 25
203
 
 
204
 
        /* Socket filtering */
205
 
        #define TARGET_SO_ATTACH_FILTER        26
206
 
        #define TARGET_SO_DETACH_FILTER        27
207
 
 
208
 
        #define TARGET_SO_PEERNAME             28
209
 
        #define TARGET_SO_TIMESTAMP            29
210
 
        #define TARGET_SCM_TIMESTAMP           TARGET_SO_TIMESTAMP
211
 
 
212
 
        #define TARGET_SO_ACCEPTCONN           30
213
 
 
214
 
        #define TARGET_SO_PEERSEC              31
 
275
    #define TARGET_SO_PASSCRED     16
 
276
    #define TARGET_SO_PEERCRED     17
 
277
    #define TARGET_SO_RCVLOWAT     18
 
278
    #define TARGET_SO_SNDLOWAT     19
 
279
    #define TARGET_SO_RCVTIMEO     20
 
280
    #define TARGET_SO_SNDTIMEO     21
 
281
#endif
 
282
 
 
283
    /* Security levels - as per NRL IPv6 - don't actually do anything */
 
284
    #define TARGET_SO_SECURITY_AUTHENTICATION              22
 
285
    #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT        23
 
286
    #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK          24
 
287
 
 
288
    #define TARGET_SO_BINDTODEVICE 25
 
289
 
 
290
    /* Socket filtering */
 
291
    #define TARGET_SO_ATTACH_FILTER        26
 
292
    #define TARGET_SO_DETACH_FILTER        27
 
293
 
 
294
    #define TARGET_SO_PEERNAME             28
 
295
    #define TARGET_SO_TIMESTAMP            29
 
296
    #define TARGET_SCM_TIMESTAMP           TARGET_SO_TIMESTAMP
 
297
 
 
298
    #define TARGET_SO_ACCEPTCONN           30
 
299
 
 
300
    #define TARGET_SO_PEERSEC              31
 
301
 
 
302
#endif
 
303
 
 
304
#ifndef ARCH_HAS_SOCKET_TYPES
 
305
    /** sock_type - Socket types - default values
 
306
     *
 
307
     *
 
308
     * @SOCK_STREAM - stream (connection) socket
 
309
     * @SOCK_DGRAM - datagram (conn.less) socket
 
310
     * @SOCK_RAW - raw socket
 
311
     * @SOCK_RDM - reliably-delivered message
 
312
     * @SOCK_SEQPACKET - sequential packet socket
 
313
     * @SOCK_DCCP - Datagram Congestion Control Protocol socket
 
314
     * @SOCK_PACKET - linux specific way of getting packets at the dev level.
 
315
     *                For writing rarp and other similar things on the user
 
316
     *                level.
 
317
     * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag.
 
318
     * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag.
 
319
     */
 
320
    enum sock_type {
 
321
           TARGET_SOCK_STREAM      = 1,
 
322
           TARGET_SOCK_DGRAM       = 2,
 
323
           TARGET_SOCK_RAW         = 3,
 
324
           TARGET_SOCK_RDM         = 4,
 
325
           TARGET_SOCK_SEQPACKET   = 5,
 
326
           TARGET_SOCK_DCCP        = 6,
 
327
           TARGET_SOCK_PACKET      = 10,
 
328
           TARGET_SOCK_CLOEXEC     = 02000000,
 
329
           TARGET_SOCK_NONBLOCK    = 04000,
 
330
    };
 
331
 
 
332
    #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1)
 
333
    #define TARGET_SOCK_TYPE_MASK    0xf  /* Covers up to TARGET_SOCK_MAX-1. */
215
334
 
216
335
#endif