cregit-Linux how code gets into the kernel

Release 4.11 net/ipv6/protocol.c

Directory: net/ipv6
/*
 * INET         An implementation of the TCP/IP protocol suite for the LINUX
 *              operating system.  INET is implemented using the  BSD Socket
 *              interface as the means of communication with the user level.
 *
 *              PF_INET6 protocol dispatch tables.
 *
 * Authors:     Pedro Roque     <roque@di.fc.ul.pt>
 *
 *              This program is free software; you can redistribute it and/or
 *              modify it under the terms of the GNU General Public License
 *              as published by the Free Software Foundation; either version
 *              2 of the License, or (at your option) any later version.
 */

/*
 *      Changes:
 *
 *      Vince Laviano (vince@cs.stanford.edu)       16 May 2001
 *      - Removed unused variable 'inet6_protocol_base'
 *      - Modified inet6_del_protocol() to correctly maintain copy bit.
 */
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
#include <net/protocol.h>

#if IS_ENABLED(CONFIG_IPV6)

const struct inet6_protocol __rcu *inet6_protos[MAX_INET_PROTOS] __read_mostly;

EXPORT_SYMBOL(inet6_protos);


int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol) { return !cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], NULL, prot) ? 0 : -1; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Dumazet1842.86%225.00%
Linus Torvalds (pre-git)1535.71%225.00%
David S. Miller716.67%225.00%
Stephen Hemminger12.38%112.50%
Alexey Dobriyan12.38%112.50%
Total42100.00%8100.00%

EXPORT_SYMBOL(inet6_add_protocol);
int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char protocol) { int ret; ret = (cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], prot, NULL) == prot) ? 0 : -1; synchronize_net(); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Vlad Yasevich55100.00%2100.00%
Total55100.00%2100.00%

EXPORT_SYMBOL(inet6_del_protocol); #endif const struct net_offload __rcu *inet6_offloads[MAX_INET_PROTOS] __read_mostly; EXPORT_SYMBOL(inet6_offloads);
int inet6_add_offload(const struct net_offload *prot, unsigned char protocol) { return !cmpxchg((const struct net_offload **)&inet6_offloads[protocol], NULL, prot) ? 0 : -1; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Dumazet1433.33%222.22%
Linus Torvalds (pre-git)1330.95%222.22%
Vlad Yasevich819.05%111.11%
David S. Miller511.90%222.22%
Alexey Dobriyan12.38%111.11%
Stephen Hemminger12.38%111.11%
Total42100.00%9100.00%

EXPORT_SYMBOL(inet6_add_offload);
int inet6_del_offload(const struct net_offload *prot, unsigned char protocol) { int ret; ret = (cmpxchg((const struct net_offload **)&inet6_offloads[protocol], prot, NULL) == prot) ? 0 : -1; synchronize_net(); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Vlad Yasevich55100.00%1100.00%
Total55100.00%1100.00%

EXPORT_SYMBOL(inet6_del_offload);

Overall Contributors

PersonTokensPropCommitsCommitProp
Vlad Yasevich15357.09%213.33%
Linus Torvalds (pre-git)4617.16%213.33%
Eric Dumazet3412.69%213.33%
David S. Miller124.48%213.33%
Hideaki Yoshifuji / 吉藤英明93.36%16.67%
Alexey Dobriyan51.87%213.33%
Tom Herbert51.87%16.67%
Stephen Hemminger20.75%16.67%
Linus Torvalds10.37%16.67%
Adrian Bunk10.37%16.67%
Total268100.00%15100.00%
Directory: net/ipv6
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.