Home
last modified time | relevance | path

Searched full:socket (Results 1 – 25 of 3698) sorted by relevance

12345678910>>...148

/freebsd/share/man/man9/
H A Dsocket.931 .Nm socket
32 .Nd "kernel socket interface"
37 .Fn soabort "struct socket *so"
39 .Fn soaccept "struct socket *so" "struct sockaddr *nam"
41 .Fn socheckuid "struct socket *so" "uid_t uid"
43 .Fn sobind "struct socket *so" "struct sockaddr *nam" "struct thread *td"
45 .Fn soclose "struct socket *so"
47 .Fn soconnect "struct socket *so" "struct sockaddr *nam" "struct thread *td"
50 .Fa "int dom" "struct socket **aso" "int type" "int proto"
54 .Fn sodisconnect "struct socket *so"
[all …]
/freebsd/tests/sys/netinet6/
H A Dtest_ip6_output.py3 import socket
30 s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
31 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_RECVPKTINFO, 1)
34 ifindex = socket.if_nametoindex(ifname)
37 ifindex = socket.if_nametoindex(ifname)
38 mreq = socket.inet_pton(socket.AF_INET6, ip) + struct.pack("I", ifindex)
39 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)
46 self.socket = s
49 # data = self.socket.recv(4096)
51 data, ancdata, msg_flags, address = self.socket.recvmsg(4096, 128)
[all …]
/freebsd/sys/sys/
H A Dsocketvar.h36 * Socket generation count type. Also used in xinpcb, xtcpcb, xunpcb.
59 * Kernel structure per socket.
64 typedef int so_upcall_t(struct socket *, void *, int);
65 typedef void so_dtor_t(struct socket *);
67 struct socket;
77 struct socket *src;
78 struct socket *dst;
96 * Locking key to struct socket:
101 * (e) locked by SOLISTEN_LOCK() of corresponding listening socket.
108 TAILQ_HEAD(accept_queue, socket);
[all …]
H A Dprotosw.h44 struct socket;
58 typedef int pr_ctloutput_t(struct socket *, struct sockopt *);
59 typedef int pr_setsbopt_t(struct socket *, struct sockopt *);
60 typedef void pr_abort_t(struct socket *);
61 typedef int pr_accept_t(struct socket *, struct sockaddr *);
62 typedef int pr_attach_t(struct socket *, int, struct thread *);
63 typedef int pr_bind_t(struct socket *, struct sockaddr *, struct thread *);
64 typedef int pr_connect_t(struct socket *, struct sockaddr *,
66 typedef int pr_connect2_t(struct socket *, struct socket *);
67 typedef int pr_control_t(struct socket *, unsigned long, void *,
[all …]
/freebsd/contrib/ntp/libntp/lib/isc/include/isc/
H A Dsocket.h27 /*! \file isc/socket.h
31 * When I/O completes, a completion event for the socket is posted to the
37 * Clients of this module must not be holding a socket's task's lock when
38 * making a call that affects that socket. Failure to follow this rule
82 * In isc_socket_bind() set socket option SO_REUSEADDR prior to calling
229 * How a socket should be shutdown in isc_socket_shutdown() calls.
263 /*% Socket and socket manager methods */
305 * This structure is actually just the common prefix of a socket manager
308 * Direct use of this structure by clients is forbidden. socket implementations
310 * of the isc_socket_ routines to work. socket implementations must maintain
[all …]
/freebsd/lib/libsys/
H A Dsocket.232 .Nm socket
39 .Fn socket "int domain" "int type" "int protocol"
42 .Fn socket
66 PF_INET_SDP OFED socket direct protocol (IPv4),
79 The socket has the indicated
86 SOCK_STREAM Stream socket,
87 SOCK_DGRAM Datagram socket,
99 SOCK_NONBLOCK Set non-blocking mode on the new socket
105 specifies a particular protocol to be used with the socket.
107 socket type within a given protocol family.
[all …]
H A Dgetsockopt.252 associated with a socket.
55 .Dq socket
58 When manipulating socket options the level at which the
60 To manipulate options at the socket level,
109 socket level options, described below.
115 Most socket-level options utilize an
138 The following options are recognized at the socket level.
164 .It Dv SO_ACCEPTFILTER Ta "set accept filter on listening socket"
168 for the socket
171 .It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)"
[all …]
H A Dsend.236 .Nd send message(s) from a socket
63 another socket.
67 may be used only when the socket is in a
75 may be used at any time if the socket is connectionless-mode.
76 If the socket is connection-mode, the protocol
79 is the only protocol with support) or the socket must be in a
92 If the socket is in a connected state, the target address passed to
122 If no messages space is available at the socket to hold
125 normally blocks, unless the socket has been placed in
160 requests that the sender side of a socket be shut down, and that an
[all …]
H A Daccept.234 .Nd accept a connection on a socket
47 is a socket that has been created with
48 .Xr socket 2 ,
56 queue of pending connections, creates a new socket,
57 and allocates a new file descriptor for the socket which
66 signals from the original socket
74 property of the new socket is instead determined by the
97 present on the queue, and the original socket
101 If the original socket
106 The accepted socket
[all …]
/freebsd/share/doc/psd/21.ipc/
H A D2.t44 The basic building block for communication is the \fIsocket\fP.
45 A socket is an endpoint of communication to which a name may
46 be \fIbound\fP. Each socket in use has a \fItype\fP
55 socket may be named \*(lq/dev/foo\*(rq. Sockets normally
77 socket facilities available to a user. An example of the
78 latter is that a socket \*(lqoperating\*(rq in the UNIX domain
82 Socket types
94 A \fIstream\fP socket provides for the bidirectional, reliable,
104 A \fIdatagram\fP socket supports bidirectional flow of data which
107 receiving messages on a datagram socket may find messages duplicated,
[all …]
/freebsd/contrib/ofed/librdmacm/
H A Drsocket.h38 #include <sys/socket.h>
49 int rbind(int socket, const struct sockaddr *addr, socklen_t addrlen);
50 int rlisten(int socket, int backlog);
51 int raccept(int socket, struct sockaddr *addr, socklen_t *addrlen);
52 int rconnect(int socket, const struct sockaddr *addr, socklen_t addrlen);
53 int rshutdown(int socket, int how);
54 int rclose(int socket);
56 ssize_t rrecv(int socket, void *buf, size_t len, int flags);
57 ssize_t rrecvfrom(int socket, void *buf, size_t len, int flags,
59 ssize_t rrecvmsg(int socket, struct msghdr *msg, int flags);
[all …]
H A Dpreload.c37 #include <sys/socket.h>
61 int (*socket)(int domain, int type, int protocol); member
62 int (*bind)(int socket, const struct sockaddr *addr, socklen_t addrlen);
63 int (*listen)(int socket, int backlog);
64 int (*accept)(int socket, struct sockaddr *addr, socklen_t *addrlen);
65 int (*connect)(int socket, const struct sockaddr *addr, socklen_t addrlen);
66 ssize_t (*recv)(int socket, void *buf, size_t len, int flags);
67 ssize_t (*recvfrom)(int socket, void *buf, size_t len, int flags,
69 ssize_t (*recvmsg)(int socket, struct msghdr *msg, int flags);
70 ssize_t (*read)(int socket, void *buf, size_t count);
[all …]
/freebsd/share/doc/psd/05.sysman/
H A D2.3.t37 file \fI<sys/socket.h>\fP.
45 Socket types and protocols
48 known as \fIsockets\fP. Each socket has the potential to exchange
51 Each socket has an associated
53 socket. Properties such as reliability, ordering, and prevention
55 The basic set of socket types is defined in \fI<sys/socket.h>\fP:
57 /* Standard socket types */
61 #define SOCK_RAW 3 /* raw socket */
67 A datagram socket may send messages to and receive messages from multiple
87 Other socket types can be defined.
[all …]
/freebsd/share/doc/smm/18.net/
H A D6.t37 layers correspond to the services provided by the socket
43 of the appropriate socket abstraction.
48 Socket layer
50 The socket layer deals with the interprocess communication
51 facilities provided by the system. A socket is a bidirectional
57 A socket consists of the following data structure:
60 struct socket {
62 short so_options; /* from socket call */
67 struct socket *so_head; /* back pointer to accept socket */
68 struct socket *so_q0; /* queue of partial connections */
[all …]
/freebsd/sys/netgraph/bluetooth/include/
H A Dng_btsocket_l2cap.h63 * Bluetooth raw L2CAP socket PCB
67 struct socket *so; /* socket */
92 * Bluetooth raw L2CAP socket methods
97 void ng_btsocket_l2cap_raw_abort (struct socket *);
98 void ng_btsocket_l2cap_raw_close (struct socket *);
99 int ng_btsocket_l2cap_raw_attach (struct socket *, int, struct thread *);
100 int ng_btsocket_l2cap_raw_bind (struct socket *, struct sockaddr *,
102 int ng_btsocket_l2cap_raw_connect (struct socket *, struct sockaddr *,
104 int ng_btsocket_l2cap_raw_control (struct socket *, u_long, void *,
106 void ng_btsocket_l2cap_raw_detach (struct socket *);
[all …]
H A Dng_btsocket_sco.h66 * Bluetooth SCO socket PCB
70 struct socket *so; /* Pointer to socket */
77 u_int16_t flags; /* socket flags */
78 #define NG_BTSOCKET_SCO_CLIENT (1 << 0) /* socket is client */
81 u_int8_t state; /* socket state */
82 #define NG_BTSOCKET_SCO_CLOSED 0 /* socket closed */
84 #define NG_BTSOCKET_SCO_OPEN 2 /* socket open */
102 * Bluetooth SCO socket methods
107 void ng_btsocket_sco_abort (struct socket *);
108 void ng_btsocket_sco_close (struct socket *);
[all …]
/freebsd/sys/security/mac/
H A Dmac_socket.c61 #include <sys/socket.h>
78 * Currently, sockets hold two labels: the label of the socket itself, and a
85 * remote socket for UNIX domain sockets rather than keeping a local copy on
90 * sockets (the socket lock) is not frequently held at the points in code
91 * where socket-related checks are called. The MAC Framework acquires the
145 mac_socket_init(struct socket *so, int flag) in mac_socket_init()
182 mac_socket_destroy(struct socket *so) in mac_socket_destroy()
208 MAC_POLICY_EXTERNALIZE(socket, label, elements, outbuf, outbuflen); in mac_socket_externalize_label()
230 MAC_POLICY_INTERNALIZE(socket, label, string); in mac_socket_internalize_label()
236 mac_socket_create(struct ucred *cred, struct socket *so) in mac_socket_create()
[all …]
/freebsd/sys/dev/hyperv/hvsock/
H A Dhv_sock.h31 #include <sys/socket.h>
39 * HyperV Socket Protocols
71 struct socket *so; /* Pointer to socket */
94 ((struct socket *)((hvspcb)->so))
97 void hvs_trans_close(struct socket *);
98 void hvs_trans_detach(struct socket *);
99 void hvs_trans_abort(struct socket *);
100 int hvs_trans_attach(struct socket *, int, struct thread *);
101 int hvs_trans_bind(struct socket *, struct sockaddr *, struct thread *);
102 int hvs_trans_listen(struct socket *, int, struct thread *);
[all …]
/freebsd/share/man/man4/
H A Dng_ksocket.440 .Nd kernel socket netgraph node type
49 socket.
52 node type allows one to open a socket inside the kernel and have
56 node type is the reverse of the socket node type (see
58 whereas the socket node type enables the user-level manipulation (via
59 a socket) of what is normally a kernel-level entity (the associated
63 what is normally a user-level entity (the associated socket).
69 equivalent to opening the associated socket.
71 determines what kind of socket the node will open (see below).
73 associated socket is closed.
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A Draw_socket_stream.cpp1 //===-- llvm/Support/raw_socket_stream.cpp - Socket streams --*- C++ -*-===//
26 #include <sys/socket.h>
75 SOCKET Socket = socket(AF_UNIX, SOCK_STREAM, 0); in getSocketFD() local
76 if (Socket == INVALID_SOCKET) { in getSocketFD()
78 int Socket = socket(AF_UNIX, SOCK_STREAM, 0); in getSocketFD()
79 if (Socket == -1) { in getSocketFD()
82 "Create socket failed"); in getSocketFD()
86 if (::connect(Socket, (struct sockaddr *)&Addr, sizeof(Addr)) == -1) in getSocketFD()
88 "Connect socket failed"); in getSocketFD()
91 return _open_osfhandle(Socket, 0); in getSocketFD()
[all …]
/freebsd/contrib/llvm-project/lldb/source/Host/common/
H A DSocket.cpp1 //===-- Socket.cpp --------------------------------------------------------===//
9 #include "lldb/Host/Socket.h"
33 #include <sys/socket.h>
58 const NativeSocket Socket::kInvalidSocketValue = INVALID_SOCKET;
62 const NativeSocket Socket::kInvalidSocketValue = -1;
73 Socket::Socket(SocketProtocol protocol, bool should_close, in Socket() function in Socket
80 Socket::~Socket() { Close(); } in ~Socket()
82 llvm::Error Socket::Initialize() { in Initialize()
100 void Socket::Terminate() { in Terminate()
106 std::unique_ptr<Socket> Socket::Create(const SocketProtocol protocol, in Create()
[all …]
/freebsd/contrib/ldns/ldns/
H A Dnet.h.in46 * the socket
51 * \return the socket used or -1 on failure
57 * the socket
59 * valid socket. Please use ldns_udp_bgsend2 instead of this function.
64 * \return the socket used or 0 on failure
70 * the socket
75 * \return the socket used or -1 on failure
81 * the socket
83 * valid socket. Please use ldns_tcp_bgsend2 instead of this function.
88 * \return the socket used or 0 on failure
[all …]
H A Dnet.h17 #include <sys/socket.h>
46 * the socket
51 * \return the socket used or -1 on failure
57 * the socket
59 * valid socket. Please use ldns_udp_bgsend2 instead of this function.
64 * \return the socket used or 0 on failure
70 * the socket
75 * \return the socket used or -1 on failure
81 * the socket
83 * valid socket. Please use ldns_tcp_bgsend2 instead of this function.
[all …]
/freebsd/contrib/libpcap/pcap/
H A Dsocket.h41 * socket access on UN*X and Windows.
52 * \brief In Winsock, a socket handle is of type SOCKET; in UN*X, it's
55 * SOCKET on Windows, so that it can be used on both platforms.
57 * We used to use SOCKET rather than PCAP_SOCKET, but that collided
59 * definitions of SOCKET, so we changed it to PCAP_SOCKET.
62 * the two active-mode APIs that return a socket handle would
63 * probably be assigning their return values to a SOCKET, and
64 * as, on Windows, we're defining PCAP_SOCKET as SOCKET, there
68 #define PCAP_SOCKET SOCKET
78 #include <sys/socket.h>
[all …]
/freebsd/tests/sys/audit/
H A Dnetwork.c27 #include <sys/socket.h>
87 * Variadic function to close socket descriptors
102 * Assign local filesystem address to a Unix domain socket
117 "socket(2) call"); in ATF_TC_HEAD()
123 ATF_REQUIRE((sockfd = socket(PF_UNIX, SOCK_STREAM, 0)) != -1); in ATF_TC_BODY()
125 snprintf(extregex, sizeof(extregex), "socket.*ret.*success,%d", sockfd); in ATF_TC_BODY()
140 "socket(2) call"); in ATF_TC_HEAD()
145 snprintf(extregex, sizeof(extregex), "socket.*%s", nosupregex); in ATF_TC_BODY()
148 ATF_REQUIRE_EQ(-1, socket(0, SOCK_STREAM, 0)); in ATF_TC_BODY()
215 ATF_REQUIRE((sockfd = socket(PF_UNIX, SOCK_STREAM, 0)) != -1); in ATF_TC_BODY()
[all …]

12345678910>>...148