- Aug 05, 2009
-
-
Jan Engelhardt authored
This sockopt goes in line with SO_TYPE and SO_PROTOCOL. It makes it possible for userspace programs to pass around file descriptors — I am referring to arguments-to-functions, but it may even work for the fd passing over UNIX sockets — without needing to also pass the auxiliary information (PF_INET6/IPPROTO_TCP). Signed-off-by:
Jan Engelhardt <jengelh@medozas.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jan Engelhardt authored
Similar to SO_TYPE returning the socket type, SO_PROTOCOL allows to retrieve the protocol used with a given socket. I am not quite sure why we have that-many copies of socket.h, and why the values are not the same on all arches either, but for where hex numbers dominate, I use 0x1029 for SO_PROTOCOL as that seems to be the next free unused number across a bunch of operating systems, or so Google results make me want to believe. SO_PROTOCOL for others just uses the next free Linux number, 38. Signed-off-by:
Jan Engelhardt <jengelh@medozas.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 06, 2009
-
-
Arnd Bergmann authored
Almost all of the ABI relevant header files now have generic versions, so use those now in order to reduce the amount of architecture specific code. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Michal Simek <monstr@monstr.eu>
-
- Apr 14, 2009
-
-
Michal Simek authored
This changes was introduce with commit: cb9eff09 net: new user space API for time stamping of incoming and outgoing packets Signed-off-by:
Michal Simek <monstr@monstr.eu>
-
- Mar 27, 2009
-
-
Michal Simek authored
Reviewed-by:
Ingo Molnar <mingo@elte.hu> Acked-by:
John Linn <john.linn@xilinx.com> Acked-by:
Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by:
John Williams <john.williams@petalogix.com> Signed-off-by:
Michal Simek <monstr@monstr.eu>
-
- Feb 16, 2009
-
-
Patrick Ohly authored
User space can request hardware and/or software time stamping. Reporting of the result(s) via a new control message is enabled separately for each field in the message because some of the fields may require additional computation and thus cause overhead. User space can tell the different kinds of time stamps apart and choose what suits its needs. When a TX timestamp operation is requested, the TX skb will be cloned and the clone will be time stamped (in hardware or software) and added to the socket error queue of the skb, if the skb has a socket associated with it. The actual TX timestamp will reach userspace as a RX timestamp on the cloned packet. If timestamping is requested and no timestamping is done in the device driver (potentially this may use hardware timestamping), it will be done in software after the device's start_hard_xmit routine. Signed-off-by:
Patrick Ohly <patrick.ohly@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 06, 2008
-
-
Chris Zankel authored
Move all header files for xtensa to arch/xtensa/include and platform and variant header files to the appropriate arch/xtensa/platforms/ and arch/xtensa/variants/ directories. Moving the files gets also rid of all uses of symlinks in the Makefile. This has been completed already for the majority of the architectures and xtensa is one out of six missing. Signed-off-by:
Sam Ravnborg <sam@ravnborg.org> Signed-off-by:
Chris Zankel <chris@zankel.net>
-
- Feb 01, 2008
-
-
Laszlo Attila Toth authored
A userspace program may wish to set the mark for each packets its send without using the netfilter MARK target. Changing the mark can be used for mark based routing without netfilter or for packet filtering. It requires CAP_NET_ADMIN capability. Signed-off-by:
Laszlo Attila Toth <panther@balabit.hu> Acked-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 26, 2007
-
-
Eric Dumazet authored
Now that network timestamps use ktime_t infrastructure, we can add a new SOL_SOCKET sockopt SO_TIMESTAMPNS. This command is similar to SO_TIMESTAMP, but permits transmission of a 'timespec struct' instead of a 'timeval struct' control message. (nanosecond resolution instead of microsecond) Control message is labelled SCM_TIMESTAMPNS instead of SCM_TIMESTAMP A socket cannot mix SO_TIMESTAMP and SO_TIMESTAMPNS : the two modes are mutually exclusive. sock_recv_timestamp() became too big to be fully inlined so I added a __sock_recv_timestamp() helper function. Signed-off-by:
Eric Dumazet <dada1@cosmosbay.com> CC: linux-arch@vger.kernel.org Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 29, 2006
-
-
Catherine Zhang authored
This patch implements an API whereby an application can determine the label of its peer's Unix datagram sockets via the auxiliary data mechanism of recvmsg. Patch purpose: This patch enables a security-aware application to retrieve the security context of the peer of a Unix datagram socket. The application can then use this security context to determine the security context for processing on behalf of the peer who sent the packet. Patch design and implementation: The design and implementation is very similar to the UDP case for INET sockets. Basically we build upon the existing Unix domain socket API for retrieving user credentials. Linux offers the API for obtaining user credentials via ancillary messages (i.e., out of band/control messages that are bundled together with a normal message). To retrieve the security context, the application first indicates to the kernel such desire by setting the SO_PASSSEC option via getsockopt. Then the application retrieves the security context using the auxiliary data mechanism. An example server application for Unix datagram socket should look like this: toggle = 1; toggle_len = sizeof(toggle); setsockopt(sockfd, SOL_SOCKET, SO_PASSSEC, &toggle, &toggle_len); recvmsg(sockfd, &msg_hdr, 0); if (msg_hdr.msg_controllen > sizeof(struct cmsghdr)) { cmsg_hdr = CMSG_FIRSTHDR(&msg_hdr); if (cmsg_hdr->cmsg_len <= CMSG_LEN(sizeof(scontext)) && cmsg_hdr->cmsg_level == SOL_SOCKET && cmsg_hdr->cmsg_type == SCM_SECURITY) { memcpy(&scontext, CMSG_DATA(cmsg_hdr), sizeof(scontext)); } } sock_setsockopt is enhanced with a new socket option SOCK_PASSSEC to allow a server socket to receive security context of the peer. Testing: We have tested the patch by setting up Unix datagram client and server applications. We verified that the server can retrieve the security context using the auxiliary data mechanism of recvmsg. Signed-off-by:
Catherine Zhang <cxzhang@watson.ibm.com> Acked-by:
Acked-by: James Morris <jmorris@namei.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 29, 2005
-
-
Patrick McHardy authored
Allows overriding of sysctl_{wmem,rmrm}_max Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 24, 2005
-
-
Chris Zankel authored
The attached patches provides part 6 of an architecture implementation for the Tensilica Xtensa CPU series. Signed-off-by:
Chris Zankel <chris@zankel.net> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- Apr 16, 2005
-
-
Linus Torvalds authored
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
-