summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.c
AgeCommit message (Collapse)Author
2009-11-28Add LINUX_SIOCGIFMTU and LINUX_IP_HDRINCL support.dsl
Fixes part of PR/31358 The other parts are rather too intrusive to be fixed as in the PR.
2009-11-13Return the result of copyout. Reminded by Niolas Joly.joerg
2009-11-13Provide SIOCGIFNAME.joerg
2009-06-17Add a new linux_msghdr structure, as its size differs on 64bit archs.njoly
Do the needed conversions in sendmsg/recvmsg syscalls, and adjust their definitions accordingly.
2009-06-16Add LINUX_CMSG_{SPACE,LEN} macros. Use then when calculating thenjoly
msg_controllen size, when converting the control message buffer from native (previous version was missing the linux_cmsghdr size).
2009-06-16For linux cmsg header copyout, use the linux structure size, not thenjoly
native one.
2009-06-16Make compat linux sendmsg/recvmsg output msghdr and control messagesnjoly
buffers with ktrace(1), just like the native functions.
2009-06-11In sendmsg(2), do copy the msghdr structure before trying to use it.njoly
2008-11-19Make the emulations, exec formats, coredump, NFS, and the NFS serverad
into modules. By and large this commit: - shuffles header files and ifdefs - splits code out where necessary to be modular - adds module glue for each of the components - adds/replaces hooks for things that can be installed at runtime
2008-08-06Convert socket options code to use a sockopt structureplunky
instead of laying everything into an mbuf. approved by core
2008-07-03Fix SIOCGIFCONF ioctl for 64bit platforms. Add a new linux_ifreqnjoly
structure and linux_getifconf function (cleaned up version from compat_ifconf). While here, update linux_getifhwaddr to use the new structure. Ok by christos.
2008-06-24Replace references to getsock/getvnode.ad
2008-06-11In linux_sys_sendto, do not unconditionnally set MSG_NAMEMBUF tonjoly
msg_flags; add it only if a target adress was provided and needs to be converted.
2008-06-09Do set mbuf in all cases, even for salen value of 0; otherwise thisnjoly
will make a panic later when trying to free memory from a random adress. XXX Need to revisit it later to avoid mbuf allocation in this case.
2008-04-29In linux_get_sa(), make salen parameter unsigned.njoly
Avoid kernel DIAGNOSTIC 0 bytes uvm mapping assertion, for negative values.
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2008-04-24Merge the socket locking patch:ad
- Socket layer becomes MP safe. - Unix protocols become MP safe. - Allows protocol processing interrupts to safely block on locks. - Fixes a number of race conditions. With much feedback from matt@ and plunky@.
2008-04-23Fix locking.ad
2008-03-26- Remove uneeded splsoftnet().ad
- Use fd_getsock().
2008-03-23linux_get_sa: fix botched fd handling.ad
2008-03-21Catch up with descriptor handling changes. See kern_descrip.c revisionad
1.173 for details.
2008-02-06Don't lock the socket to set/clear FNONBLOCK. Just set it atomically.ad
2007-12-20Convert all the system call entry points from:dsl
int foo(struct lwp *l, void *v, register_t *retval) to: int foo(struct lwp *l, const struct foo_args *uap, register_t *retval) Fixup compat code to not write into 'uap' and (in some cases) to actually pass a correctly formatted 'uap' structure with the right name to the next routine. A few 'compat' routines that just call standard ones have been deleted. All the 'compat' code compiles (along with the kernels required to test build it). 98% done by automated scripts.
2007-12-08ANSIfy most of the function definitions in sys/compat (but not ndis).dsl
All by the magic of sed ...
2007-12-05Use IFADDR_EMPTY().dyoung
2007-12-05Don't open-code queue(3) macros (x = ifnet.tqh_first; y =dyoung
x.if_list.tqe_next). Instead, use the macros themselves. Use IFNET_FOREACH() and IFADDR_FOREACH().
2007-12-04Remove all the __Pdsl
2007-10-19Add compat_linux and exec_linux_elf lkm support for amd64:njoly
- Add needed COMPAT_OSSAUDIO to GENERIC. - Add missing includes needed by linux_syscallargs.h. - Add lkm building.
2007-08-29Constify: LLADDR() -> CLLADDR().dyoung
2007-08-26Use satosdl().dyoung
2007-08-15Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposedad
on tech-kern.
2007-07-01Fix long-term breakage in the definition of 'control' data for linux.dsl
cmsg->cmsg_len is 'size_t' not 'socklen_t' - so it is 8 bytes on 64bit platforms instead of 4. There is also never padding after the header. Redo linux sendmsg() so that it stands a chance of getting it right. Redo linux recvmsg() so that it process control data directly from the mbuf list. Allowing it to hack the data without using the stackgap.
2007-06-06Wrap ktrace calls with #ifdef KTRACE.rjs
2007-06-02wrap #include "opt_ktrace.h" by #ifdef _KERNEL_OPT.yamt
2007-06-01Split sys_bind() and sys_connect() so that compat code can use common codedsl
once the 'address' has been copied into an mbuf. Add extra flags for 'struct msghdr.msg_flags' to indicate that the address and control are already in mbufs, and that the uio structure is in userspace for sending data, rename sendit() to do_sys_sendmsg() to ensure no old code passes in random flags. Changes to compat code to use new functions - removing some stackgap use. Fix a 'use after free' in compat_43_sys_recvmsg. I ***THINK*** the code that converts 'cmsg' formatted data is borked! svr4_stream.c ought to be generated from svr4_32_stream.c during the build.
2007-05-29Add a sockaddr_storage member to "struct ifreq" maintaining backwardschristos
compatibility with the older ioctls. This avoids stack smashing and abuse of "struct sockaddr" when ioctls placed "struct sockaddr_foo's" that were longer than "struct sockaddr". XXX: Some of the emulations might be broken; I tried to add code for them but I did not test them.
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2007-02-11Make setsockopt return compatible error codes for AF_UNIX sockets.mlelstv
2007-02-09Merge newlock2 to head.ad
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-09-02comment out impossible codechristos
2006-07-23Use the LWP cached credentials where sane.ad
2006-06-27Use the new socket call for Linux and SVR4, because those systems (atpavel
least Linux 2.4.31, Irix 6.5.20 and Solaris 10) use EAFNOSUPPORT. Only the Linux emulation has been tested. XXX somebody should audit the other emulations...
2006-06-26version the socket(2) syscall. for compat30 socket, we usemrg
EPROTONOSUPPORT instead of EAFNOSUPPORT. from pavel@ with a little bit of clean up from myself. XXX: netbsd32 (and perhaps other emulations) should be able XXX: to call the standard socket calls for this i think, but XXX: revisit this at another time.
2006-05-14integrate kauth.elad
2006-05-12use socklen_t when talking to the NetBSD side of thingsmrg
2006-03-27Use __arraycount().dyoung
2006-02-09Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough somanu
that the i386 license manager part of amd64 version of Fluent works. While I'm here, add SysV IPC to COMPAT_LINUX/amd64
2005-12-11merge ktrace-lwp.christos