summaryrefslogtreecommitdiff
path: root/include/linux/net.h
AgeCommit message (Collapse)Author
2006-01-03[NET]: move struct proto_ops to constEric Dumazet
I noticed that some of 'struct proto_ops' used in the kernel may share a cache line used by locks or other heavily modified data. (default linker alignement is 32 bytes, and L1_CACHE_LINE is 64 or 128 at least) This patch makes sure a 'struct proto_ops' can be declared as const, so that all cpus can share all parts of it without false sharing. This is not mandatory : a driver can still use a read/write structure if it needs to (and eventually a __read_mostly) I made a global stubstitute to change all existing occurences to make them const. This should reduce the possibility of false sharing on SMP, and speedup some socket system calls. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-07[PATCH] kernel-doc: fix some kernel-api warningsRandy Dunlap
Fix various warnings in kernel-doc: Warning(linux-2614-rc4//include/linux/net.h:89): Enum value 'SOCK_DCCP' not described in enum 'sock_type' usercopy.c: should use !E instead of !I for exported symbols: Warning(linux-2614-rc4//arch/i386/lib/usercopy.c): no structured comments found fs.h does not need to use !E since it has no exported symbols: Warning(linux-2614-rc4//include/linux/fs.h:1182): No description found for parameter 'find_exported_dentry' Warning(linux-2614-rc4//include/linux/fs.h): no structured comments found irq/manage.c should use !E for its exported symbols: Warning(linux-2614-rc4//kernel/irq/manage.c): no structured comments found macmodes.c should use !E for its exported symbols: Warning(linux-2614-rc4//drivers/video/macmodes.c): no structured comments found Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-29[NET]: Fix sparse warningsArnaldo Carvalho de Melo
Of this type, mostly: CHECK net/ipv6/netfilter.c net/ipv6/netfilter.c:96:12: warning: symbol 'ipv6_netfilter_init' was not declared. Should it be static? net/ipv6/netfilter.c:101:6: warning: symbol 'ipv6_netfilter_fini' was not declared. Should it be static? Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[DCCP]: Initial implementationArnaldo Carvalho de Melo
Development to this point was done on a subversion repository at: http://oops.ghostprotocols.net:81/cgi-bin/viewcvs.cgi/dccp-2.6/ This repository will be kept at this site for the foreseable future, so that interested parties can see the history of this code, attributions, etc. If I ever decide to take this offline I'll provide the full history at some other suitable place. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29[NETLINK]: Add properly module refcounting for kernel netlink sockets.Harald Welte
- Remove bogus code for compiling netlink as module - Add module refcounting support for modules implementing a netlink protocol - Add support for autoloading modules that implement a netlink protocol as soon as someone opens a socket for that protocol Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-23[NET]: Kill stray reference to sock->passcred.David S. Miller
That struct member was deleted, but a comment was not updated to reflect this. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-05[PATCH] update Ross Biro bouncing email addressJesper Juhl
Ross moved. Remove the bad email address so people will find the correct one in ./CREDITS. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01[PATCH] DocBook: changes and extensions to the kernel documentationPavel Pisa
I have recompiled Linux kernel 2.6.11.5 documentation for me and our university students again. The documentation could be extended for more sources which are equipped by structured comments for recent 2.6 kernels. I have tried to proceed with that task. I have done that more times from 2.6.0 time and it gets boring to do same changes again and again. Linux kernel compiles after changes for i386 and ARM targets. I have added references to some more files into kernel-api book, I have added some section names as well. So please, check that changes do not break something and that categories are not too much skewed. I have changed kernel-doc to accept "fastcall" and "asmlinkage" words reserved by kernel convention. Most of the other changes are modifications in the comments to make kernel-doc happy, accept some parameters description and do not bail out on errors. Changed <pid> to @pid in the description, moved some #ifdef before comments to correct function to comments bindings, etc. You can see result of the modified documentation build at http://cmp.felk.cvut.cz/~pisa/linux/lkdb-2.6.11.tar.gz Some more sources are ready to be included into kernel-doc generated documentation. Sources has been added into kernel-api for now. Some more section names added and probably some more chaos introduced as result of quick cleanup work. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-09[NET]: Passcred cleanup in struct sockHerbert Pötzl
struct socket uses a 'bool' (unsigned char) to 'flag' the pass-credential option for sockets (which can be easily replaced by a flag) Signed-off-by: David S. Miller <davem@davemloft.net>
2004-12-27[NET]: No need to export sock_readv_writevAdrian Bunk
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-25[NET]: Remove dead socket layer exports.Christoph Hellwig
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-15[SOCKET] make enum socket_type be arch overridableArnaldo Carvalho de Melo
To cope with MIPS, that has SOCK_STREAM and SOCK_DGRAM values swapped to deal with binary compat. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-09-06[NET]: Move SOCK_foo types into linux/net.hArnaldo Carvalho de Melo
Every arch defines them the same without exception and with this we only need to update one spot when adding new socket types. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-08-15[NET]: Enhanced version of net_random().Stephen Hemminger
Here is another alternative, using tansworthe generator. It uses percpu state. The one small semantic change is the net_srandom() only affects the current cpu's seed. The problem was that having it change all cpu's seed would mean adding locking and the only user's today are a couple of places that feed in mac address to try make sure address resolution to collide. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-15[PATCH] sparse: beginning of iovec cleanups - infrastructureAlexander Viro
Beginning of iovec cleanups - added two helpers (kernel_{send,recv}msg) that do sock_sendmsg/sock_recvmsg with kvec instead of iovec; basically, they were abstracted from earlier afs patch. They take kvec/length of kvec as separate arguments, do set_fs(), stick kvec into msghdr and call sock_...msg(). The next group of patches will switch network filesystems to use of kvec for kernel data + use of these helpers. Basically, the same thing we'd done for afs.
2004-05-30[PATCH] sparse: missed setsockopt wrappersAlexander Viro
Here's the tail of setsockopt I've missed - for old protocol families we have wrappers around those methods.
2004-05-08[NET]: Add sock_create_lite()James Morris
The purpose of this is to allow sockets created by the kernel in this way to be passed through the LSM socket creation hooks and be labeled and mediated in the same manner as other sockets. This patches addresses a class of potential issues with LSMs, where such sockets will not be labeled correctly (if at all), or mediated during creation. Under SELinux, it fixes a specific bug where RPC sockets created by the kernel during TCP NFS serving are unlabeled.
2004-05-08[NET]: Add sock_create_kern()James Morris
Under SELinux, and potentially other LSMs, we need to be able to distinguish between user sockets and kernel sockets. For SELinux specifically, kernel sockets need to be specially labeled during creation, then bypass access control checks (they are controlled by the kernel itself and not subject to SELinux mediation). This addresses a class of potential issues in SELinux where, for example, a TCP NFS session times out, then the kernel re-establishes an RPC connection upon further user activity. We do not want such kernel created sockets to be labeled with user security contexts. sock_create() and sock_create_kern() are wrapper functions, which seems semantically clearer to me than e.g. adding a flag to sock_create(). If you prefer the latter, then let me know. The patch also adds an argument to the LSM socket creation functions indicating whether the socket being created is a kernel socket or not.
2004-01-08[NET]: Use size_t for size argument in {send,recv}msg callchain.Stephen Hemminger
2003-09-01[NET]: Use MODULE_ALIAS() in network families.Rusty Russell
Previously, default aliases were hardwired into modutils. Now they should be inside the modules, using MODULE_ALIAS() (they will be overridden by any user alias).
2003-05-12Add user pointer annotations to socket, file IO and signalLinus Torvalds
handling. This pointed out a bug in x86 sys_rt_sigreturn(), btw.
2003-05-02o net: improve the current module infrastructureArnaldo Carvalho de Melo
As per discussions in netdev we'll probably be moving to a brand new scheme, but this set of changesets have been discussed and are an improvement to the current situation and were already done prior to this thread happening.
2003-04-22o net: module refcounting for sk_alloc/sk_freeArnaldo Carvalho de Melo
I had to move the rtnetlink_init and init_netlink calls to af_netlink init time, so that the sk_alloc called down the rtnetlink_init callchain is done after the PF_NETLINK net_proto_family is sock_registered, and because of that the af_netlink init function call had to be moved to earlier by means of subsys_initcall (DaveM's suggestion).
2003-04-19o net: new module infrastructure for net_proto_familyArnaldo Carvalho de Melo
Next batch of changesets will fix the legacy protocols (IPX, LLC, etc). Tested with LLC and IPX already.
2003-04-06o linux/net.h: prune the include dependency tree, remove include socket.hArnaldo Carvalho de Melo
Use struct forward declaration and fix irda.h and netlink.h to include what uses (only sa_family_t).
2003-04-03o linux/net.h: bye bye struct net_protoArnaldo Carvalho de Melo
struct net_proto is not anymore needed, as the protocols have their init functions marked as __init, not needing explicit calling.
2003-04-02o linux/net.h: CodingStyle changes and kerneldoc style structs documentationArnaldo Carvalho de Melo
2003-03-05[NET]: Simplify scm handling and sendmsg/recvmsg invocation, consolidate net ↵Benjamin LaHaise
compat syscalls. 1) Pull scm argument from sendmsg/recvmsg, it is available from I/O control block 2) Consolidate networking syscall compat call into net/compat.c 3) Change ops->{sendmsg,recvmsg}() code sequences into sock_{sendmsg,recvmsg}()
2003-02-26[PATCH] C99 initializers for include/linux/net.hArt Haas
2002-10-15[NET]: Export sockfd_lookup.Maksim Krasnyanskiy
2002-10-11include/linux/net.h: Update SOCKOPS_WRAPPED to new AIO recvmsg/sendmsg args.David S. Miller
2002-10-10net-kiocb.diffBenjamin LaHaise
2002-08-19lksctp-2_5_31-0_5_1.patchJon Grimm
2002-02-05[PATCH] (1/2) inode trimmingAlexander Viro
more inode->u trimming - socket_i is killed.
2002-02-04v2.4.3.2 -> v2.4.3.3Linus Torvalds
- Hui-Fen Hsu: sis900 driver update - NIIBE Yutaka: Super-H update - Alan Cox: more resyncs (ARM down, but more to go) - David Miller: network zerocopy, Sparc sync, qlogic,FC fix, etc. - David Miller/me: get rid of various drivers hacks to do mmap alignment behind the back of the VM layer. Create a real protocol for it.
2002-02-04Import changesetLinus Torvalds