Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bits
File: socket.h
/* System-specific socket constants and types. Linux version.
[0] Fix | Delete
Copyright (C) 1991-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
#ifndef __BITS_SOCKET_H
[18] Fix | Delete
#define __BITS_SOCKET_H
[19] Fix | Delete
[20] Fix | Delete
#ifndef _SYS_SOCKET_H
[21] Fix | Delete
# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
[22] Fix | Delete
#endif
[23] Fix | Delete
[24] Fix | Delete
#define __need_size_t
[25] Fix | Delete
#include <stddef.h>
[26] Fix | Delete
[27] Fix | Delete
#include <sys/types.h>
[28] Fix | Delete
[29] Fix | Delete
/* Type for length arguments in socket calls. */
[30] Fix | Delete
#ifndef __socklen_t_defined
[31] Fix | Delete
typedef __socklen_t socklen_t;
[32] Fix | Delete
# define __socklen_t_defined
[33] Fix | Delete
#endif
[34] Fix | Delete
[35] Fix | Delete
/* Get the architecture-dependent definition of enum __socket_type. */
[36] Fix | Delete
#include <bits/socket_type.h>
[37] Fix | Delete
[38] Fix | Delete
/* Protocol families. */
[39] Fix | Delete
#define PF_UNSPEC 0 /* Unspecified. */
[40] Fix | Delete
#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
[41] Fix | Delete
#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */
[42] Fix | Delete
#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
[43] Fix | Delete
#define PF_INET 2 /* IP protocol family. */
[44] Fix | Delete
#define PF_AX25 3 /* Amateur Radio AX.25. */
[45] Fix | Delete
#define PF_IPX 4 /* Novell Internet Protocol. */
[46] Fix | Delete
#define PF_APPLETALK 5 /* Appletalk DDP. */
[47] Fix | Delete
#define PF_NETROM 6 /* Amateur radio NetROM. */
[48] Fix | Delete
#define PF_BRIDGE 7 /* Multiprotocol bridge. */
[49] Fix | Delete
#define PF_ATMPVC 8 /* ATM PVCs. */
[50] Fix | Delete
#define PF_X25 9 /* Reserved for X.25 project. */
[51] Fix | Delete
#define PF_INET6 10 /* IP version 6. */
[52] Fix | Delete
#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
[53] Fix | Delete
#define PF_DECnet 12 /* Reserved for DECnet project. */
[54] Fix | Delete
#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
[55] Fix | Delete
#define PF_SECURITY 14 /* Security callback pseudo AF. */
[56] Fix | Delete
#define PF_KEY 15 /* PF_KEY key management API. */
[57] Fix | Delete
#define PF_NETLINK 16
[58] Fix | Delete
#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
[59] Fix | Delete
#define PF_PACKET 17 /* Packet family. */
[60] Fix | Delete
#define PF_ASH 18 /* Ash. */
[61] Fix | Delete
#define PF_ECONET 19 /* Acorn Econet. */
[62] Fix | Delete
#define PF_ATMSVC 20 /* ATM SVCs. */
[63] Fix | Delete
#define PF_RDS 21 /* RDS sockets. */
[64] Fix | Delete
#define PF_SNA 22 /* Linux SNA Project */
[65] Fix | Delete
#define PF_IRDA 23 /* IRDA sockets. */
[66] Fix | Delete
#define PF_PPPOX 24 /* PPPoX sockets. */
[67] Fix | Delete
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
[68] Fix | Delete
#define PF_LLC 26 /* Linux LLC. */
[69] Fix | Delete
#define PF_IB 27 /* Native InfiniBand address. */
[70] Fix | Delete
#define PF_MPLS 28 /* MPLS. */
[71] Fix | Delete
#define PF_CAN 29 /* Controller Area Network. */
[72] Fix | Delete
#define PF_TIPC 30 /* TIPC sockets. */
[73] Fix | Delete
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
[74] Fix | Delete
#define PF_IUCV 32 /* IUCV sockets. */
[75] Fix | Delete
#define PF_RXRPC 33 /* RxRPC sockets. */
[76] Fix | Delete
#define PF_ISDN 34 /* mISDN sockets. */
[77] Fix | Delete
#define PF_PHONET 35 /* Phonet sockets. */
[78] Fix | Delete
#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
[79] Fix | Delete
#define PF_CAIF 37 /* CAIF sockets. */
[80] Fix | Delete
#define PF_ALG 38 /* Algorithm sockets. */
[81] Fix | Delete
#define PF_NFC 39 /* NFC sockets. */
[82] Fix | Delete
#define PF_VSOCK 40 /* vSockets. */
[83] Fix | Delete
#define PF_KCM 41 /* Kernel Connection Multiplexor. */
[84] Fix | Delete
#define PF_QIPCRTR 42 /* Qualcomm IPC Router. */
[85] Fix | Delete
#define PF_SMC 43 /* SMC sockets. */
[86] Fix | Delete
#define PF_XDP 44 /* XDP sockets. */
[87] Fix | Delete
#define PF_MAX 45 /* For now.. */
[88] Fix | Delete
[89] Fix | Delete
/* Address families. */
[90] Fix | Delete
#define AF_UNSPEC PF_UNSPEC
[91] Fix | Delete
#define AF_LOCAL PF_LOCAL
[92] Fix | Delete
#define AF_UNIX PF_UNIX
[93] Fix | Delete
#define AF_FILE PF_FILE
[94] Fix | Delete
#define AF_INET PF_INET
[95] Fix | Delete
#define AF_AX25 PF_AX25
[96] Fix | Delete
#define AF_IPX PF_IPX
[97] Fix | Delete
#define AF_APPLETALK PF_APPLETALK
[98] Fix | Delete
#define AF_NETROM PF_NETROM
[99] Fix | Delete
#define AF_BRIDGE PF_BRIDGE
[100] Fix | Delete
#define AF_ATMPVC PF_ATMPVC
[101] Fix | Delete
#define AF_X25 PF_X25
[102] Fix | Delete
#define AF_INET6 PF_INET6
[103] Fix | Delete
#define AF_ROSE PF_ROSE
[104] Fix | Delete
#define AF_DECnet PF_DECnet
[105] Fix | Delete
#define AF_NETBEUI PF_NETBEUI
[106] Fix | Delete
#define AF_SECURITY PF_SECURITY
[107] Fix | Delete
#define AF_KEY PF_KEY
[108] Fix | Delete
#define AF_NETLINK PF_NETLINK
[109] Fix | Delete
#define AF_ROUTE PF_ROUTE
[110] Fix | Delete
#define AF_PACKET PF_PACKET
[111] Fix | Delete
#define AF_ASH PF_ASH
[112] Fix | Delete
#define AF_ECONET PF_ECONET
[113] Fix | Delete
#define AF_ATMSVC PF_ATMSVC
[114] Fix | Delete
#define AF_RDS PF_RDS
[115] Fix | Delete
#define AF_SNA PF_SNA
[116] Fix | Delete
#define AF_IRDA PF_IRDA
[117] Fix | Delete
#define AF_PPPOX PF_PPPOX
[118] Fix | Delete
#define AF_WANPIPE PF_WANPIPE
[119] Fix | Delete
#define AF_LLC PF_LLC
[120] Fix | Delete
#define AF_IB PF_IB
[121] Fix | Delete
#define AF_MPLS PF_MPLS
[122] Fix | Delete
#define AF_CAN PF_CAN
[123] Fix | Delete
#define AF_TIPC PF_TIPC
[124] Fix | Delete
#define AF_BLUETOOTH PF_BLUETOOTH
[125] Fix | Delete
#define AF_IUCV PF_IUCV
[126] Fix | Delete
#define AF_RXRPC PF_RXRPC
[127] Fix | Delete
#define AF_ISDN PF_ISDN
[128] Fix | Delete
#define AF_PHONET PF_PHONET
[129] Fix | Delete
#define AF_IEEE802154 PF_IEEE802154
[130] Fix | Delete
#define AF_CAIF PF_CAIF
[131] Fix | Delete
#define AF_ALG PF_ALG
[132] Fix | Delete
#define AF_NFC PF_NFC
[133] Fix | Delete
#define AF_VSOCK PF_VSOCK
[134] Fix | Delete
#define AF_KCM PF_KCM
[135] Fix | Delete
#define AF_QIPCRTR PF_QIPCRTR
[136] Fix | Delete
#define AF_SMC PF_SMC
[137] Fix | Delete
#define AF_XDP PF_XDP
[138] Fix | Delete
#define AF_MAX PF_MAX
[139] Fix | Delete
[140] Fix | Delete
/* Socket level values. Others are defined in the appropriate headers.
[141] Fix | Delete
[142] Fix | Delete
XXX These definitions also should go into the appropriate headers as
[143] Fix | Delete
far as they are available. */
[144] Fix | Delete
#define SOL_RAW 255
[145] Fix | Delete
#define SOL_DECNET 261
[146] Fix | Delete
#define SOL_X25 262
[147] Fix | Delete
#define SOL_PACKET 263
[148] Fix | Delete
#define SOL_ATM 264 /* ATM layer (cell level). */
[149] Fix | Delete
#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
[150] Fix | Delete
#define SOL_IRDA 266
[151] Fix | Delete
#define SOL_NETBEUI 267
[152] Fix | Delete
#define SOL_LLC 268
[153] Fix | Delete
#define SOL_DCCP 269
[154] Fix | Delete
#define SOL_NETLINK 270
[155] Fix | Delete
#define SOL_TIPC 271
[156] Fix | Delete
#define SOL_RXRPC 272
[157] Fix | Delete
#define SOL_PPPOL2TP 273
[158] Fix | Delete
#define SOL_BLUETOOTH 274
[159] Fix | Delete
#define SOL_PNPIPE 275
[160] Fix | Delete
#define SOL_RDS 276
[161] Fix | Delete
#define SOL_IUCV 277
[162] Fix | Delete
#define SOL_CAIF 278
[163] Fix | Delete
#define SOL_ALG 279
[164] Fix | Delete
#define SOL_NFC 280
[165] Fix | Delete
#define SOL_KCM 281
[166] Fix | Delete
#define SOL_TLS 282
[167] Fix | Delete
#define SOL_XDP 283
[168] Fix | Delete
[169] Fix | Delete
/* Maximum queue length specifiable by listen. */
[170] Fix | Delete
#define SOMAXCONN 128
[171] Fix | Delete
[172] Fix | Delete
/* Get the definition of the macro to define the common sockaddr members. */
[173] Fix | Delete
#include <bits/sockaddr.h>
[174] Fix | Delete
[175] Fix | Delete
/* Structure describing a generic socket address. */
[176] Fix | Delete
struct sockaddr
[177] Fix | Delete
{
[178] Fix | Delete
__SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
[179] Fix | Delete
char sa_data[14]; /* Address data. */
[180] Fix | Delete
};
[181] Fix | Delete
[182] Fix | Delete
[183] Fix | Delete
/* Structure large enough to hold any socket address (with the historical
[184] Fix | Delete
exception of AF_UNIX). */
[185] Fix | Delete
#define __ss_aligntype unsigned long int
[186] Fix | Delete
#define _SS_PADSIZE \
[187] Fix | Delete
(_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype))
[188] Fix | Delete
[189] Fix | Delete
struct sockaddr_storage
[190] Fix | Delete
{
[191] Fix | Delete
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
[192] Fix | Delete
char __ss_padding[_SS_PADSIZE];
[193] Fix | Delete
__ss_aligntype __ss_align; /* Force desired alignment. */
[194] Fix | Delete
};
[195] Fix | Delete
[196] Fix | Delete
[197] Fix | Delete
/* Bits in the FLAGS argument to `send', `recv', et al. */
[198] Fix | Delete
enum
[199] Fix | Delete
{
[200] Fix | Delete
MSG_OOB = 0x01, /* Process out-of-band data. */
[201] Fix | Delete
#define MSG_OOB MSG_OOB
[202] Fix | Delete
MSG_PEEK = 0x02, /* Peek at incoming messages. */
[203] Fix | Delete
#define MSG_PEEK MSG_PEEK
[204] Fix | Delete
MSG_DONTROUTE = 0x04, /* Don't use local routing. */
[205] Fix | Delete
#define MSG_DONTROUTE MSG_DONTROUTE
[206] Fix | Delete
#ifdef __USE_GNU
[207] Fix | Delete
/* DECnet uses a different name. */
[208] Fix | Delete
MSG_TRYHARD = MSG_DONTROUTE,
[209] Fix | Delete
# define MSG_TRYHARD MSG_DONTROUTE
[210] Fix | Delete
#endif
[211] Fix | Delete
MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
[212] Fix | Delete
#define MSG_CTRUNC MSG_CTRUNC
[213] Fix | Delete
MSG_PROXY = 0x10, /* Supply or ask second address. */
[214] Fix | Delete
#define MSG_PROXY MSG_PROXY
[215] Fix | Delete
MSG_TRUNC = 0x20,
[216] Fix | Delete
#define MSG_TRUNC MSG_TRUNC
[217] Fix | Delete
MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
[218] Fix | Delete
#define MSG_DONTWAIT MSG_DONTWAIT
[219] Fix | Delete
MSG_EOR = 0x80, /* End of record. */
[220] Fix | Delete
#define MSG_EOR MSG_EOR
[221] Fix | Delete
MSG_WAITALL = 0x100, /* Wait for a full request. */
[222] Fix | Delete
#define MSG_WAITALL MSG_WAITALL
[223] Fix | Delete
MSG_FIN = 0x200,
[224] Fix | Delete
#define MSG_FIN MSG_FIN
[225] Fix | Delete
MSG_SYN = 0x400,
[226] Fix | Delete
#define MSG_SYN MSG_SYN
[227] Fix | Delete
MSG_CONFIRM = 0x800, /* Confirm path validity. */
[228] Fix | Delete
#define MSG_CONFIRM MSG_CONFIRM
[229] Fix | Delete
MSG_RST = 0x1000,
[230] Fix | Delete
#define MSG_RST MSG_RST
[231] Fix | Delete
MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
[232] Fix | Delete
#define MSG_ERRQUEUE MSG_ERRQUEUE
[233] Fix | Delete
MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
[234] Fix | Delete
#define MSG_NOSIGNAL MSG_NOSIGNAL
[235] Fix | Delete
MSG_MORE = 0x8000, /* Sender will send more. */
[236] Fix | Delete
#define MSG_MORE MSG_MORE
[237] Fix | Delete
MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
[238] Fix | Delete
#define MSG_WAITFORONE MSG_WAITFORONE
[239] Fix | Delete
MSG_BATCH = 0x40000, /* sendmmsg: more messages coming. */
[240] Fix | Delete
#define MSG_BATCH MSG_BATCH
[241] Fix | Delete
MSG_ZEROCOPY = 0x4000000, /* Use user data in kernel path. */
[242] Fix | Delete
#define MSG_ZEROCOPY MSG_ZEROCOPY
[243] Fix | Delete
MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */
[244] Fix | Delete
#define MSG_FASTOPEN MSG_FASTOPEN
[245] Fix | Delete
[246] Fix | Delete
MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
[247] Fix | Delete
descriptor received through
[248] Fix | Delete
SCM_RIGHTS. */
[249] Fix | Delete
#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
[250] Fix | Delete
};
[251] Fix | Delete
[252] Fix | Delete
[253] Fix | Delete
/* Structure describing messages sent by
[254] Fix | Delete
`sendmsg' and received by `recvmsg'. */
[255] Fix | Delete
struct msghdr
[256] Fix | Delete
{
[257] Fix | Delete
void *msg_name; /* Address to send to/receive from. */
[258] Fix | Delete
socklen_t msg_namelen; /* Length of address data. */
[259] Fix | Delete
[260] Fix | Delete
struct iovec *msg_iov; /* Vector of data to send/receive into. */
[261] Fix | Delete
size_t msg_iovlen; /* Number of elements in the vector. */
[262] Fix | Delete
[263] Fix | Delete
void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
[264] Fix | Delete
size_t msg_controllen; /* Ancillary data buffer length.
[265] Fix | Delete
!! The type should be socklen_t but the
[266] Fix | Delete
definition of the kernel is incompatible
[267] Fix | Delete
with this. */
[268] Fix | Delete
[269] Fix | Delete
int msg_flags; /* Flags on received message. */
[270] Fix | Delete
};
[271] Fix | Delete
[272] Fix | Delete
/* Structure used for storage of ancillary data object information. */
[273] Fix | Delete
struct cmsghdr
[274] Fix | Delete
{
[275] Fix | Delete
size_t cmsg_len; /* Length of data in cmsg_data plus length
[276] Fix | Delete
of cmsghdr structure.
[277] Fix | Delete
!! The type should be socklen_t but the
[278] Fix | Delete
definition of the kernel is incompatible
[279] Fix | Delete
with this. */
[280] Fix | Delete
int cmsg_level; /* Originating protocol. */
[281] Fix | Delete
int cmsg_type; /* Protocol specific type. */
[282] Fix | Delete
#if __glibc_c99_flexarr_available
[283] Fix | Delete
__extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
[284] Fix | Delete
#endif
[285] Fix | Delete
};
[286] Fix | Delete
[287] Fix | Delete
/* Ancillary data object manipulation macros. */
[288] Fix | Delete
#if __glibc_c99_flexarr_available
[289] Fix | Delete
# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
[290] Fix | Delete
#else
[291] Fix | Delete
# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
[292] Fix | Delete
#endif
[293] Fix | Delete
#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
[294] Fix | Delete
#define CMSG_FIRSTHDR(mhdr) \
[295] Fix | Delete
((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
[296] Fix | Delete
? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
[297] Fix | Delete
#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
[298] Fix | Delete
& (size_t) ~(sizeof (size_t) - 1))
[299] Fix | Delete
#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
[300] Fix | Delete
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
[301] Fix | Delete
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
[302] Fix | Delete
[303] Fix | Delete
/* Given a length, return the additional padding necessary such that
[304] Fix | Delete
len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
[305] Fix | Delete
#define __CMSG_PADDING(len) ((sizeof (size_t) \
[306] Fix | Delete
- ((len) & (sizeof (size_t) - 1))) \
[307] Fix | Delete
& (sizeof (size_t) - 1))
[308] Fix | Delete
[309] Fix | Delete
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
[310] Fix | Delete
struct cmsghdr *__cmsg) __THROW;
[311] Fix | Delete
#ifdef __USE_EXTERN_INLINES
[312] Fix | Delete
# ifndef _EXTERN_INLINE
[313] Fix | Delete
# define _EXTERN_INLINE __extern_inline
[314] Fix | Delete
# endif
[315] Fix | Delete
_EXTERN_INLINE struct cmsghdr *
[316] Fix | Delete
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
[317] Fix | Delete
{
[318] Fix | Delete
/* We may safely assume that __cmsg lies between __mhdr->msg_control and
[319] Fix | Delete
__mhdr->msg_controllen because the user is required to obtain the first
[320] Fix | Delete
cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
[321] Fix | Delete
via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
[322] Fix | Delete
trust the value of __cmsg->cmsg_len and therefore do not use it in any
[323] Fix | Delete
pointer arithmetic until we check its value. */
[324] Fix | Delete
[325] Fix | Delete
unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
[326] Fix | Delete
unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
[327] Fix | Delete
[328] Fix | Delete
size_t __size_needed = sizeof (struct cmsghdr)
[329] Fix | Delete
+ __CMSG_PADDING (__cmsg->cmsg_len);
[330] Fix | Delete
[331] Fix | Delete
/* The current header is malformed, too small to be a full header. */
[332] Fix | Delete
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
[333] Fix | Delete
return (struct cmsghdr *) 0;
[334] Fix | Delete
[335] Fix | Delete
/* There isn't enough space between __cmsg and the end of the buffer to
[336] Fix | Delete
hold the current cmsg *and* the next one. */
[337] Fix | Delete
if (((size_t)
[338] Fix | Delete
(__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
[339] Fix | Delete
< __size_needed)
[340] Fix | Delete
|| ((size_t)
[341] Fix | Delete
(__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
[342] Fix | Delete
- __size_needed)
[343] Fix | Delete
< __cmsg->cmsg_len))
[344] Fix | Delete
[345] Fix | Delete
return (struct cmsghdr *) 0;
[346] Fix | Delete
[347] Fix | Delete
/* Now, we trust cmsg_len and can use it to find the next header. */
[348] Fix | Delete
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
[349] Fix | Delete
+ CMSG_ALIGN (__cmsg->cmsg_len));
[350] Fix | Delete
return __cmsg;
[351] Fix | Delete
}
[352] Fix | Delete
#endif /* Use `extern inline'. */
[353] Fix | Delete
[354] Fix | Delete
/* Socket level message types. This must match the definitions in
[355] Fix | Delete
<linux/socket.h>. */
[356] Fix | Delete
enum
[357] Fix | Delete
{
[358] Fix | Delete
SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
[359] Fix | Delete
#define SCM_RIGHTS SCM_RIGHTS
[360] Fix | Delete
#ifdef __USE_GNU
[361] Fix | Delete
, SCM_CREDENTIALS = 0x02 /* Credentials passing. */
[362] Fix | Delete
# define SCM_CREDENTIALS SCM_CREDENTIALS
[363] Fix | Delete
#endif
[364] Fix | Delete
};
[365] Fix | Delete
[366] Fix | Delete
#ifdef __USE_GNU
[367] Fix | Delete
/* User visible structure for SCM_CREDENTIALS message */
[368] Fix | Delete
struct ucred
[369] Fix | Delete
{
[370] Fix | Delete
pid_t pid; /* PID of sending process. */
[371] Fix | Delete
uid_t uid; /* UID of sending process. */
[372] Fix | Delete
gid_t gid; /* GID of sending process. */
[373] Fix | Delete
};
[374] Fix | Delete
#endif
[375] Fix | Delete
[376] Fix | Delete
/* Ugly workaround for unclean kernel headers. */
[377] Fix | Delete
#ifndef __USE_MISC
[378] Fix | Delete
# ifndef FIOGETOWN
[379] Fix | Delete
# define __SYS_SOCKET_H_undef_FIOGETOWN
[380] Fix | Delete
# endif
[381] Fix | Delete
# ifndef FIOSETOWN
[382] Fix | Delete
# define __SYS_SOCKET_H_undef_FIOSETOWN
[383] Fix | Delete
# endif
[384] Fix | Delete
# ifndef SIOCATMARK
[385] Fix | Delete
# define __SYS_SOCKET_H_undef_SIOCATMARK
[386] Fix | Delete
# endif
[387] Fix | Delete
# ifndef SIOCGPGRP
[388] Fix | Delete
# define __SYS_SOCKET_H_undef_SIOCGPGRP
[389] Fix | Delete
# endif
[390] Fix | Delete
# ifndef SIOCGSTAMP
[391] Fix | Delete
# define __SYS_SOCKET_H_undef_SIOCGSTAMP
[392] Fix | Delete
# endif
[393] Fix | Delete
# ifndef SIOCGSTAMPNS
[394] Fix | Delete
# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
[395] Fix | Delete
# endif
[396] Fix | Delete
# ifndef SIOCSPGRP
[397] Fix | Delete
# define __SYS_SOCKET_H_undef_SIOCSPGRP
[398] Fix | Delete
# endif
[399] Fix | Delete
#endif
[400] Fix | Delete
#ifndef IOCSIZE_MASK
[401] Fix | Delete
# define __SYS_SOCKET_H_undef_IOCSIZE_MASK
[402] Fix | Delete
#endif
[403] Fix | Delete
#ifndef IOCSIZE_SHIFT
[404] Fix | Delete
# define __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
[405] Fix | Delete
#endif
[406] Fix | Delete
#ifndef IOC_IN
[407] Fix | Delete
# define __SYS_SOCKET_H_undef_IOC_IN
[408] Fix | Delete
#endif
[409] Fix | Delete
#ifndef IOC_INOUT
[410] Fix | Delete
# define __SYS_SOCKET_H_undef_IOC_INOUT
[411] Fix | Delete
#endif
[412] Fix | Delete
#ifndef IOC_OUT
[413] Fix | Delete
# define __SYS_SOCKET_H_undef_IOC_OUT
[414] Fix | Delete
#endif
[415] Fix | Delete
[416] Fix | Delete
/* Get socket manipulation related informations from kernel headers. */
[417] Fix | Delete
#include <asm/socket.h>
[418] Fix | Delete
[419] Fix | Delete
#ifndef __USE_MISC
[420] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
[421] Fix | Delete
# undef __SYS_SOCKET_H_undef_FIOGETOWN
[422] Fix | Delete
# undef FIOGETOWN
[423] Fix | Delete
# endif
[424] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
[425] Fix | Delete
# undef __SYS_SOCKET_H_undef_FIOSETOWN
[426] Fix | Delete
# undef FIOSETOWN
[427] Fix | Delete
# endif
[428] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
[429] Fix | Delete
# undef __SYS_SOCKET_H_undef_SIOCATMARK
[430] Fix | Delete
# undef SIOCATMARK
[431] Fix | Delete
# endif
[432] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
[433] Fix | Delete
# undef __SYS_SOCKET_H_undef_SIOCGPGRP
[434] Fix | Delete
# undef SIOCGPGRP
[435] Fix | Delete
# endif
[436] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
[437] Fix | Delete
# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
[438] Fix | Delete
# undef SIOCGSTAMP
[439] Fix | Delete
# endif
[440] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
[441] Fix | Delete
# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
[442] Fix | Delete
# undef SIOCGSTAMPNS
[443] Fix | Delete
# endif
[444] Fix | Delete
# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
[445] Fix | Delete
# undef __SYS_SOCKET_H_undef_SIOCSPGRP
[446] Fix | Delete
# undef SIOCSPGRP
[447] Fix | Delete
# endif
[448] Fix | Delete
#endif
[449] Fix | Delete
#ifdef __SYS_SOCKET_H_undef_IOCSIZE_MASK
[450] Fix | Delete
# undef __SYS_SOCKET_H_undef_IOCSIZE_MASK
[451] Fix | Delete
# undef IOCSIZE_MASK
[452] Fix | Delete
#endif
[453] Fix | Delete
#ifdef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
[454] Fix | Delete
# undef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
[455] Fix | Delete
# undef IOCSIZE_SHIFT
[456] Fix | Delete
#endif
[457] Fix | Delete
#ifdef __SYS_SOCKET_H_undef_IOC_IN
[458] Fix | Delete
# undef __SYS_SOCKET_H_undef_IOC_IN
[459] Fix | Delete
# undef IOC_IN
[460] Fix | Delete
#endif
[461] Fix | Delete
#ifdef __SYS_SOCKET_H_undef_IOC_INOUT
[462] Fix | Delete
# undef __SYS_SOCKET_H_undef_IOC_INOUT
[463] Fix | Delete
# undef IOC_INOUT
[464] Fix | Delete
#endif
[465] Fix | Delete
#ifdef __SYS_SOCKET_H_undef_IOC_OUT
[466] Fix | Delete
# undef __SYS_SOCKET_H_undef_IOC_OUT
[467] Fix | Delete
# undef IOC_OUT
[468] Fix | Delete
#endif
[469] Fix | Delete
[470] Fix | Delete
/* Structure used to manipulate the SO_LINGER option. */
[471] Fix | Delete
struct linger
[472] Fix | Delete
{
[473] Fix | Delete
int l_onoff; /* Nonzero to linger on close. */
[474] Fix | Delete
int l_linger; /* Time to linger. */
[475] Fix | Delete
};
[476] Fix | Delete
[477] Fix | Delete
#endif /* bits/socket.h */
[478] Fix | Delete
[479] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function