aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-24 05:39:10 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-28 00:42:45 -0400
commit0a204500f913974b4ca9b6f509a43e1544239c6d (patch)
treeea0ab0c7eb77e4a8d8daf1639ede9029665d4f8b /net/core
parent8e8e43843ba3ced0c657cbc0fdb10644ec60f772 (diff)
[NET] NEIGHBOUR: Make each EXPORT_SYMBOL{,_GPL}() immediately follow its function/variable.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index d8d0ca99c651..d4fae81e5d0d 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -123,6 +123,7 @@ unsigned long neigh_rand_reach_time(unsigned long base)
123{ 123{
124 return (base ? (net_random() % base) + (base >> 1) : 0); 124 return (base ? (net_random() % base) + (base >> 1) : 0);
125} 125}
126EXPORT_SYMBOL(neigh_rand_reach_time);
126 127
127 128
128static int neigh_forced_gc(struct neigh_table *tbl) 129static int neigh_forced_gc(struct neigh_table *tbl)
@@ -241,6 +242,7 @@ void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev)
241 neigh_flush_dev(tbl, dev); 242 neigh_flush_dev(tbl, dev);
242 write_unlock_bh(&tbl->lock); 243 write_unlock_bh(&tbl->lock);
243} 244}
245EXPORT_SYMBOL(neigh_changeaddr);
244 246
245int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev) 247int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
246{ 248{
@@ -253,6 +255,7 @@ int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
253 pneigh_queue_purge(&tbl->proxy_queue); 255 pneigh_queue_purge(&tbl->proxy_queue);
254 return 0; 256 return 0;
255} 257}
258EXPORT_SYMBOL(neigh_ifdown);
256 259
257static struct neighbour *neigh_alloc(struct neigh_table *tbl) 260static struct neighbour *neigh_alloc(struct neigh_table *tbl)
258{ 261{
@@ -374,6 +377,7 @@ struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
374 read_unlock_bh(&tbl->lock); 377 read_unlock_bh(&tbl->lock);
375 return n; 378 return n;
376} 379}
380EXPORT_SYMBOL(neigh_lookup);
377 381
378struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net, 382struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
379 const void *pkey) 383 const void *pkey)
@@ -397,6 +401,7 @@ struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
397 read_unlock_bh(&tbl->lock); 401 read_unlock_bh(&tbl->lock);
398 return n; 402 return n;
399} 403}
404EXPORT_SYMBOL(neigh_lookup_nodev);
400 405
401struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey, 406struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey,
402 struct net_device *dev) 407 struct net_device *dev)
@@ -465,6 +470,7 @@ out_neigh_release:
465 neigh_release(n); 470 neigh_release(n);
466 goto out; 471 goto out;
467} 472}
473EXPORT_SYMBOL(neigh_create);
468 474
469struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, 475struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl,
470 struct net *net, const void *pkey, struct net_device *dev) 476 struct net *net, const void *pkey, struct net_device *dev)
@@ -487,6 +493,7 @@ struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl,
487 493
488 return n; 494 return n;
489} 495}
496EXPORT_SYMBOL_GPL(__pneigh_lookup);
490 497
491struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl, 498struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl,
492 struct net *net, const void *pkey, 499 struct net *net, const void *pkey,
@@ -546,6 +553,7 @@ struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl,
546out: 553out:
547 return n; 554 return n;
548} 555}
556EXPORT_SYMBOL(pneigh_lookup);
549 557
550 558
551int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *pkey, 559int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *pkey,
@@ -653,6 +661,7 @@ void neigh_destroy(struct neighbour *neigh)
653 atomic_dec(&neigh->tbl->entries); 661 atomic_dec(&neigh->tbl->entries);
654 kmem_cache_free(neigh->tbl->kmem_cachep, neigh); 662 kmem_cache_free(neigh->tbl->kmem_cachep, neigh);
655} 663}
664EXPORT_SYMBOL(neigh_destroy);
656 665
657/* Neighbour state is suspicious; 666/* Neighbour state is suspicious;
658 disable fast path. 667 disable fast path.
@@ -933,6 +942,7 @@ out_unlock_bh:
933 write_unlock_bh(&neigh->lock); 942 write_unlock_bh(&neigh->lock);
934 return rc; 943 return rc;
935} 944}
945EXPORT_SYMBOL(__neigh_event_send);
936 946
937static void neigh_update_hhs(struct neighbour *neigh) 947static void neigh_update_hhs(struct neighbour *neigh)
938{ 948{
@@ -1105,6 +1115,7 @@ out:
1105 1115
1106 return err; 1116 return err;
1107} 1117}
1118EXPORT_SYMBOL(neigh_update);
1108 1119
1109struct neighbour *neigh_event_ns(struct neigh_table *tbl, 1120struct neighbour *neigh_event_ns(struct neigh_table *tbl,
1110 u8 *lladdr, void *saddr, 1121 u8 *lladdr, void *saddr,
@@ -1117,6 +1128,7 @@ struct neighbour *neigh_event_ns(struct neigh_table *tbl,
1117 NEIGH_UPDATE_F_OVERRIDE); 1128 NEIGH_UPDATE_F_OVERRIDE);
1118 return neigh; 1129 return neigh;
1119} 1130}
1131EXPORT_SYMBOL(neigh_event_ns);
1120 1132
1121static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst, 1133static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst,
1122 __be16 protocol) 1134 __be16 protocol)
@@ -1171,6 +1183,7 @@ int neigh_compat_output(struct sk_buff *skb)
1171 1183
1172 return dev_queue_xmit(skb); 1184 return dev_queue_xmit(skb);
1173} 1185}
1186EXPORT_SYMBOL(neigh_compat_output);
1174 1187
1175/* Slow and careful. */ 1188/* Slow and careful. */
1176 1189
@@ -1216,6 +1229,7 @@ out_kfree_skb:
1216 kfree_skb(skb); 1229 kfree_skb(skb);
1217 goto out; 1230 goto out;
1218} 1231}
1232EXPORT_SYMBOL(neigh_resolve_output);
1219 1233
1220/* As fast as possible without hh cache */ 1234/* As fast as possible without hh cache */
1221 1235
@@ -1240,6 +1254,7 @@ int neigh_connected_output(struct sk_buff *skb)
1240 } 1254 }
1241 return err; 1255 return err;
1242} 1256}
1257EXPORT_SYMBOL(neigh_connected_output);
1243 1258
1244static void neigh_proxy_process(unsigned long arg) 1259static void neigh_proxy_process(unsigned long arg)
1245{ 1260{
@@ -1301,6 +1316,7 @@ void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
1301 mod_timer(&tbl->proxy_timer, sched_next); 1316 mod_timer(&tbl->proxy_timer, sched_next);
1302 spin_unlock(&tbl->proxy_queue.lock); 1317 spin_unlock(&tbl->proxy_queue.lock);
1303} 1318}
1319EXPORT_SYMBOL(pneigh_enqueue);
1304 1320
1305static inline struct neigh_parms *lookup_neigh_params(struct neigh_table *tbl, 1321static inline struct neigh_parms *lookup_neigh_params(struct neigh_table *tbl,
1306 struct net *net, int ifindex) 1322 struct net *net, int ifindex)
@@ -1353,6 +1369,7 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
1353 } 1369 }
1354 return p; 1370 return p;
1355} 1371}
1372EXPORT_SYMBOL(neigh_parms_alloc);
1356 1373
1357static void neigh_rcu_free_parms(struct rcu_head *head) 1374static void neigh_rcu_free_parms(struct rcu_head *head)
1358{ 1375{
@@ -1383,6 +1400,7 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
1383 write_unlock_bh(&tbl->lock); 1400 write_unlock_bh(&tbl->lock);
1384 NEIGH_PRINTK1("neigh_parms_release: not found\n"); 1401 NEIGH_PRINTK1("neigh_parms_release: not found\n");
1385} 1402}
1403EXPORT_SYMBOL(neigh_parms_release);
1386 1404
1387static void neigh_parms_destroy(struct neigh_parms *parms) 1405static void neigh_parms_destroy(struct neigh_parms *parms)
1388{ 1406{
@@ -1445,6 +1463,7 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
1445 tbl->last_flush = now; 1463 tbl->last_flush = now;
1446 tbl->last_rand = now + tbl->parms.reachable_time * 20; 1464 tbl->last_rand = now + tbl->parms.reachable_time * 20;
1447} 1465}
1466EXPORT_SYMBOL(neigh_table_init_no_netlink);
1448 1467
1449void neigh_table_init(struct neigh_table *tbl) 1468void neigh_table_init(struct neigh_table *tbl)
1450{ 1469{
@@ -1466,6 +1485,7 @@ void neigh_table_init(struct neigh_table *tbl)
1466 dump_stack(); 1485 dump_stack();
1467 } 1486 }
1468} 1487}
1488EXPORT_SYMBOL(neigh_table_init);
1469 1489
1470int neigh_table_clear(struct neigh_table *tbl) 1490int neigh_table_clear(struct neigh_table *tbl)
1471{ 1491{
@@ -1503,6 +1523,7 @@ int neigh_table_clear(struct neigh_table *tbl)
1503 1523
1504 return 0; 1524 return 0;
1505} 1525}
1526EXPORT_SYMBOL(neigh_table_clear);
1506 1527
1507static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 1528static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
1508{ 1529{
@@ -2536,6 +2557,7 @@ void neigh_app_ns(struct neighbour *n)
2536{ 2557{
2537 __neigh_notify(n, RTM_GETNEIGH, NLM_F_REQUEST); 2558 __neigh_notify(n, RTM_GETNEIGH, NLM_F_REQUEST);
2538} 2559}
2560EXPORT_SYMBOL(neigh_app_ns);
2539#endif /* CONFIG_ARPD */ 2561#endif /* CONFIG_ARPD */
2540 2562
2541#ifdef CONFIG_SYSCTL 2563#ifdef CONFIG_SYSCTL
@@ -2782,6 +2804,7 @@ free:
2782err: 2804err:
2783 return -ENOBUFS; 2805 return -ENOBUFS;
2784} 2806}
2807EXPORT_SYMBOL(neigh_sysctl_register);
2785 2808
2786void neigh_sysctl_unregister(struct neigh_parms *p) 2809void neigh_sysctl_unregister(struct neigh_parms *p)
2787{ 2810{
@@ -2793,6 +2816,7 @@ void neigh_sysctl_unregister(struct neigh_parms *p)
2793 kfree(t); 2816 kfree(t);
2794 } 2817 }
2795} 2818}
2819EXPORT_SYMBOL(neigh_sysctl_unregister);
2796 2820
2797#endif /* CONFIG_SYSCTL */ 2821#endif /* CONFIG_SYSCTL */
2798 2822
@@ -2810,32 +2834,3 @@ static int __init neigh_init(void)
2810 2834
2811subsys_initcall(neigh_init); 2835subsys_initcall(neigh_init);
2812 2836
2813EXPORT_SYMBOL(__neigh_event_send);
2814EXPORT_SYMBOL(neigh_changeaddr);
2815EXPORT_SYMBOL(neigh_compat_output);
2816EXPORT_SYMBOL(neigh_connected_output);
2817EXPORT_SYMBOL(neigh_create);
2818EXPORT_SYMBOL(neigh_destroy);
2819EXPORT_SYMBOL(neigh_event_ns);
2820EXPORT_SYMBOL(neigh_ifdown);
2821EXPORT_SYMBOL(neigh_lookup);
2822EXPORT_SYMBOL(neigh_lookup_nodev);
2823EXPORT_SYMBOL(neigh_parms_alloc);
2824EXPORT_SYMBOL(neigh_parms_release);
2825EXPORT_SYMBOL(neigh_rand_reach_time);
2826EXPORT_SYMBOL(neigh_resolve_output);
2827EXPORT_SYMBOL(neigh_table_clear);
2828EXPORT_SYMBOL(neigh_table_init);
2829EXPORT_SYMBOL(neigh_table_init_no_netlink);
2830EXPORT_SYMBOL(neigh_update);
2831EXPORT_SYMBOL(pneigh_enqueue);
2832EXPORT_SYMBOL(pneigh_lookup);
2833EXPORT_SYMBOL_GPL(__pneigh_lookup);
2834
2835#ifdef CONFIG_ARPD
2836EXPORT_SYMBOL(neigh_app_ns);
2837#endif
2838#ifdef CONFIG_SYSCTL
2839EXPORT_SYMBOL(neigh_sysctl_register);
2840EXPORT_SYMBOL(neigh_sysctl_unregister);
2841#endif