PageRenderTime 619ms queryFilters 0ms Sphinxql 107ms GetByIds 394ms meta 0ms repositoryFilters 2ms languageFilters 0ms sourceFilters 30ms

8,972 results for 'MSG_PEEK' (619 ms)

Source

Language

Repository

337-net-recvmsg-MSG_PEEK.patch http://wl500g.googlecode.com/svn/trunk/ | Unknown | 81 lines
1Subject: [PATCH] tcp: Fix recvmsg MSG_PEEK influence of blocking behavior.
2From 518a09ef11f8454f4676125d47c3e775b300c6a5
6Vito Caputo noticed that tcp_recvmsg() returns immediately from
7partial reads when MSG_PEEK is used.  In particular, this means that
8SO_RCVLOWAT is not respected.
15
16Subject: [PATCH] tcp: fix MSG_PEEK race check
17From 775273131810caa41dfc7f9e552ea5d8508caf40
20
21Commit 518a09ef11 (tcp: Fix recvmsg MSG_PEEK influence of
22blocking behavior) lets the loop run longer than the race check
55-			    signal_pending(current) ||
56-			    (flags & MSG_PEEK))
57+			    signal_pending(current))
64 		}
65-		if ((flags & MSG_PEEK) && peek_seq != tp->copied_seq) {
66+		if ((flags & MSG_PEEK) &&
MSG_PEEK.tmSnippet https://bitbucket.org/missdeer/luapack | Unknown | 17 lines
5	<key>content</key>
6	<string>Unix.MSG_PEEK</string>
7	<key>name</key>
7	<key>name</key>
8	<string>MSG_PEEK</string>
9	<key>scope</key>
MSG_PEEK.tmSnippet http://luapack.googlecode.com/svn/trunk/ | Unknown | 17 lines
5	<key>content</key>
6	<string>Unix.MSG_PEEK</string>
7	<key>name</key>
7	<key>name</key>
8	<string>MSG_PEEK</string>
9	<key>scope</key>
extconf.rb https://github.com/ahwuyeah/ruby.git | Ruby | 694 lines
123
124RECVMSG_WITH_MSG_PEEK_ALLOCATE_FD_TEST = <<'EOF'
125#include <stdlib.h>
192
193    ss = recvmsg(sv[1], &r_msg, MSG_PEEK);
194    if (ss == -1) { perror("recvmsg"); exit(EXIT_FAILURE); }
244
245def test_recvmsg_with_msg_peek_creates_fds(headers)
246  case RUBY_PLATFORM
247  when /linux/
248    # Linux 2.6.38 allocate fds by recvmsg with MSG_PEEK.
249    close_fds = true
251    # FreeBSD 8.2.0, NetBSD 5 and MacOS X Snow Leopard doesn't
252    # allocate fds by recvmsg with MSG_PEEK.
253    # [ruby-dev:44189]
uipc_socket.c https://github.com/neilss/4.4BSD-Lite.git | C | 1,025 lines
506		error = (*pr->pr_usrreq)(so, PRU_RCVOOB,
507		    m, (struct mbuf *)(flags & MSG_PEEK), (struct mbuf *)0);
508		if (error)
555			error = so->so_error;
556			if ((flags & MSG_PEEK) == 0)
557				so->so_error = 0;
598		orig_resid = 0;
599		if (flags & MSG_PEEK) {
600			if (paddr)
616	while (m && m->m_type == MT_CONTROL && error == 0) {
617		if (flags & MSG_PEEK) {
618			if (controlp)
642	if (m) {
643		if ((flags & MSG_PEEK) == 0)
644			m->m_nextpkt = nextrecord;
uipc_socket.c https://github.com/brauceunix/4.4BSD-Lite2.git | C | 1,044 lines
520		error = (*pr->pr_usrreq)(so, PRU_RCVOOB, m,
521		    (struct mbuf *)(long)(flags & MSG_PEEK), (struct mbuf *)0);
522		if (error)
569			error = so->so_error;
570			if ((flags & MSG_PEEK) == 0)
571				so->so_error = 0;
612		orig_resid = 0;
613		if (flags & MSG_PEEK) {
614			if (paddr)
630	while (m && m->m_type == MT_CONTROL && error == 0) {
631		if (flags & MSG_PEEK) {
632			if (controlp)
656	if (m) {
657		if ((flags & MSG_PEEK) == 0)
658			m->m_nextpkt = nextrecord;
socket.d https://github.com/drewet/druntime.git | D | 1,217 lines
102MSG_OOB
103MSG_PEEK
104MSG_TRUNC
462        MSG_OOB         = 0x01,
463        MSG_PEEK        = 0x02,
464        MSG_TRUNC       = 0x20,
612        MSG_OOB         = 0x1,
613        MSG_PEEK        = 0x2,
614        MSG_TRUNC       = 0x10,
784        MSG_OOB         = 0x1,
785        MSG_PEEK        = 0x2,
786        MSG_TRUNC       = 0x10,
919        MSG_OOB = 0x1,
920        MSG_PEEK = 0x2,
921        MSG_TRUNC = 0x20,
uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch https://github.com/fanicy/buildroot.git | Patch | 1,375 lines
702-    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
703-#define MSG_PEEK	MSG_PEEK
704-    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
1130-    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
1131-#define MSG_PEEK	MSG_PEEK
1132-    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
ancdata.c https://github.com/ahwuyeah/ruby.git | C | 1,839 lines
1400static void
1401discard_cmsg(struct cmsghdr *cmh, char *msg_end, int msg_peek_p)
1402{
1402{
1403# if !defined(FD_PASSING_WORK_WITH_RECVMSG_MSG_PEEK)
1404    /*
1405     * FreeBSD 8.2.0, NetBSD 5 and MacOS X Snow Leopard doesn't
1406     * allocate fds by recvmsg with MSG_PEEK.
1407     * [ruby-dev:44189]
1409     *
1410     * Linux 2.6.38 allocate fds by recvmsg with MSG_PEEK.
1411     */
1411     */
1412    if (msg_peek_p)
1413        return;
socket.h https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8 | C++ Header | 407 lines
200    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
201#define MSG_PEEK	MSG_PEEK
202    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
socket.h https://github.com/apc-io/apc-rock-toolchain.git | C++ Header | 436 lines
204    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
205#define MSG_PEEK	MSG_PEEK
206    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
udpservice.cc https://github.com/pyloor/picklingtools.git | C++ | 1,154 lines
946//                                 recvfrom() network IF call;
947//                                 most commonly used would be MSG_PEEK
948//
1016//                                              recvfrom() network IF call;
1017//                                              most commonly used would be MSG_PEEK
1018//   struct sockaddr_in* clientAddr        OUT; network source address of sender
1085//                                              recvfrom() network IF call;
1086//                                              most commonly used would be MSG_PEEK
1087//   string              &srcHost          OUT; Hostname of sender
socket.h https://github.com/hyperion70/linaro_toolchains_2014.git | C++ Header | 386 lines
175    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
176#define MSG_PEEK	MSG_PEEK
177    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
simpleproxy.py https://github.com/greatagent3/esr.git | Python | 1,799 lines
791        if not self.disable_transport_ssl and self.scheme == 'http':
792            leadbyte = self.connection.recv(1, socket.MSG_PEEK)
793            if leadbyte in ('\x80', '\x16'):
796                    for _ in xrange(2):
797                        leaddata = self.connection.recv(1024, socket.MSG_PEEK)
798                        if is_clienthello(leaddata):
1167                    else:
1168                        data = sock.recv(4096, socket.MSG_PEEK)
1169                    if not data:
JackNetInterface.cpp https://github.com/eamoc/jack2.git | C++ | 1,006 lines
483        do {
484            rx_bytes = Recv(fParams.fMtu, MSG_PEEK);
485            // connection issue (return -1)
522            // how much data is queued on the rx buffer ?
523            rx_bytes = Recv(fParams.fMtu, MSG_PEEK);
524         
896            // how much data is queued on the rx buffer ?
897            rx_bytes = Recv(fParams.fMtu, MSG_PEEK);
898
connection.c https://github.com/james-w/haproxy.git | C | 702 lines
235 * TCP MSS. So it MUST always be delivered as one segment, which ensures we
236 * can safely use MSG_PEEK and avoid buffering.
237 *
259	do {
260		trash.len = recv(conn->t.sock.fd, trash.str, trash.size, MSG_PEEK);
261		if (trash.len < 0) {
473 missing:
474	/* Missing data. Since we're using MSG_PEEK, we can only poll again if
475	 * we have not read anything. Otherwise we need to fail because we won't
uipc_socket.cc https://gitlab.com/jforge/osv.git | C++ | 3,583 lines
1305	m = m_get(M_WAIT, MT_DATA);
1306	error = (*pr->pr_usrreqs->pru_rcvoob)(so, m, flags & MSG_PEEK);
1307	if (error)
1427			error = so->so_error;
1428			if ((flags & MSG_PEEK) == 0)
1429				so->so_error = 0;
1491			    M_NOWAIT);
1492		if (flags & MSG_PEEK) {
1493			m = m->m_hdr.mh_next;
1503	 * Process one or more MT_CONTROL mbufs present before any data mbufs
1504	 * in the first mbuf chain on the socket buffer.  If MSG_PEEK, we
1505	 * just copy the data; if !MSG_PEEK, we call into the protocol to
1512		do {
1513			if (flags & MSG_PEEK) {
1514				if (controlp != NULL) {
ERRATA.txt https://bitbucket.org/nexenta/onnv_134 | text | 786 lines
55 #define _stream_peek	1	/* ioctl(I_PEEK) works */
56 #define _socket_peek	1	/* recv(MSG_PEEK) works */
57 #define _hdr_string	1	/* #include <string.h> ok */
68 #define _stream_peek	1	/* ioctl(I_PEEK) works */
69 #define _socket_peek	1	/* recv(MSG_PEEK) works */
70 #define _hdr_string	1	/* #include <string.h> ok */
81 #define _stream_peek	1	/* ioctl(I_PEEK) works */
82 #define _socket_peek	1	/* recv(MSG_PEEK) works */
83 #define _hdr_string	1	/* #include <string.h> ok */
94 #define _stream_peek	1	/* ioctl(I_PEEK) works */
95 #define _socket_peek	1	/* recv(MSG_PEEK) works */
96 #define _hdr_string	1	/* #include <string.h> ok */
107 #define _stream_peek	1	/* ioctl(I_PEEK) works */
108 #define _socket_peek	1	/* recv(MSG_PEEK) works */
109 #define _hdr_string	1	/* #include <string.h> ok */
uipc_socket.c https://github.com/7shi/openbsd-loongson-vc.git | C | 1,316 lines
573		error = (*pr->pr_usrreq)(so, PRU_RCVOOB, m,
574		    (struct mbuf *)(long)(flags & MSG_PEEK), NULL, curproc);
575		if (error)
621			error = so->so_error;
622			if ((flags & MSG_PEEK) == 0)
623				so->so_error = 0;
674		orig_resid = 0;
675		if (flags & MSG_PEEK) {
676			if (paddr)
692	while (m && m->m_type == MT_CONTROL && error == 0) {
693		if (flags & MSG_PEEK) {
694			if (controlp)
733	if (m) {
734		if ((flags & MSG_PEEK) == 0) {
735			m->m_nextpkt = nextrecord;
extconf.rb https://github.com/jhs/ruby-inabox.git | Ruby | 636 lines
123
124RECVMSG_WITH_MSG_PEEK_ALLOCATE_FD_TEST = <<'EOF'
125#include <stdlib.h>
192
193    ss = recvmsg(sv[1], &r_msg, MSG_PEEK);
194    if (ss == -1) { perror("recvmsg"); exit(EXIT_FAILURE); }
244
245def test_recvmsg_with_msg_peek_creates_fds(headers)
246  case RUBY_PLATFORM
247  when /linux/
248    # Linux 2.6.38 allocate fds by recvmsg with MSG_PEEK.
249    close_fds = true
251    # FreeBSD 8.2.0, NetBSD 5 and MacOS X Snow Leopard doesn't
252    # allocate fds by recvmsg with MSG_PEEK.
253    # [ruby-dev:44189]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21