diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-24 05:39:10 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-28 00:42:45 -0400 |
commit | 0a204500f913974b4ca9b6f509a43e1544239c6d (patch) | |
tree | ea0ab0c7eb77e4a8d8daf1639ede9029665d4f8b /net/core | |
parent | 8e8e43843ba3ced0c657cbc0fdb10644ec60f772 (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.c | 53 |
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 | } |
126 | EXPORT_SYMBOL(neigh_rand_reach_time); | ||
126 | 127 | ||
127 | 128 | ||
128 | static int neigh_forced_gc(struct neigh_table *tbl) | 129 | static 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 | } |
245 | EXPORT_SYMBOL(neigh_changeaddr); | ||
244 | 246 | ||
245 | int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev) | 247 | int 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 | } |
258 | EXPORT_SYMBOL(neigh_ifdown); | ||
256 | 259 | ||
257 | static struct neighbour *neigh_alloc(struct neigh_table *tbl) | 260 | static 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 | } |
380 | EXPORT_SYMBOL(neigh_lookup); | ||
377 | 381 | ||
378 | struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net, | 382 | struct 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 | } |
404 | EXPORT_SYMBOL(neigh_lookup_nodev); | ||
400 | 405 | ||
401 | struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey, | 406 | struct 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 | } |
473 | EXPORT_SYMBOL(neigh_create); | ||
468 | 474 | ||
469 | struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, | 475 | struct 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 | } |
496 | EXPORT_SYMBOL_GPL(__pneigh_lookup); | ||
490 | 497 | ||
491 | struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl, | 498 | struct 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, | |||
546 | out: | 553 | out: |
547 | return n; | 554 | return n; |
548 | } | 555 | } |
556 | EXPORT_SYMBOL(pneigh_lookup); | ||
549 | 557 | ||
550 | 558 | ||
551 | int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *pkey, | 559 | int 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 | } |
664 | EXPORT_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 | } |
945 | EXPORT_SYMBOL(__neigh_event_send); | ||
936 | 946 | ||
937 | static void neigh_update_hhs(struct neighbour *neigh) | 947 | static void neigh_update_hhs(struct neighbour *neigh) |
938 | { | 948 | { |
@@ -1105,6 +1115,7 @@ out: | |||
1105 | 1115 | ||
1106 | return err; | 1116 | return err; |
1107 | } | 1117 | } |
1118 | EXPORT_SYMBOL(neigh_update); | ||
1108 | 1119 | ||
1109 | struct neighbour *neigh_event_ns(struct neigh_table *tbl, | 1120 | struct 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 | } |
1131 | EXPORT_SYMBOL(neigh_event_ns); | ||
1120 | 1132 | ||
1121 | static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst, | 1133 | static 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 | } |
1186 | EXPORT_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 | } |
1232 | EXPORT_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 | } |
1257 | EXPORT_SYMBOL(neigh_connected_output); | ||
1243 | 1258 | ||
1244 | static void neigh_proxy_process(unsigned long arg) | 1259 | static 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 | } |
1319 | EXPORT_SYMBOL(pneigh_enqueue); | ||
1304 | 1320 | ||
1305 | static inline struct neigh_parms *lookup_neigh_params(struct neigh_table *tbl, | 1321 | static 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 | } |
1372 | EXPORT_SYMBOL(neigh_parms_alloc); | ||
1356 | 1373 | ||
1357 | static void neigh_rcu_free_parms(struct rcu_head *head) | 1374 | static 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 | } |
1403 | EXPORT_SYMBOL(neigh_parms_release); | ||
1386 | 1404 | ||
1387 | static void neigh_parms_destroy(struct neigh_parms *parms) | 1405 | static 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 | } |
1466 | EXPORT_SYMBOL(neigh_table_init_no_netlink); | ||
1448 | 1467 | ||
1449 | void neigh_table_init(struct neigh_table *tbl) | 1468 | void 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 | } |
1488 | EXPORT_SYMBOL(neigh_table_init); | ||
1469 | 1489 | ||
1470 | int neigh_table_clear(struct neigh_table *tbl) | 1490 | int 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 | } |
1526 | EXPORT_SYMBOL(neigh_table_clear); | ||
1506 | 1527 | ||
1507 | static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | 1528 | static 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 | } |
2560 | EXPORT_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: | |||
2782 | err: | 2804 | err: |
2783 | return -ENOBUFS; | 2805 | return -ENOBUFS; |
2784 | } | 2806 | } |
2807 | EXPORT_SYMBOL(neigh_sysctl_register); | ||
2785 | 2808 | ||
2786 | void neigh_sysctl_unregister(struct neigh_parms *p) | 2809 | void 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 | } |
2819 | EXPORT_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 | ||
2811 | subsys_initcall(neigh_init); | 2835 | subsys_initcall(neigh_init); |
2812 | 2836 | ||
2813 | EXPORT_SYMBOL(__neigh_event_send); | ||
2814 | EXPORT_SYMBOL(neigh_changeaddr); | ||
2815 | EXPORT_SYMBOL(neigh_compat_output); | ||
2816 | EXPORT_SYMBOL(neigh_connected_output); | ||
2817 | EXPORT_SYMBOL(neigh_create); | ||
2818 | EXPORT_SYMBOL(neigh_destroy); | ||
2819 | EXPORT_SYMBOL(neigh_event_ns); | ||
2820 | EXPORT_SYMBOL(neigh_ifdown); | ||
2821 | EXPORT_SYMBOL(neigh_lookup); | ||
2822 | EXPORT_SYMBOL(neigh_lookup_nodev); | ||
2823 | EXPORT_SYMBOL(neigh_parms_alloc); | ||
2824 | EXPORT_SYMBOL(neigh_parms_release); | ||
2825 | EXPORT_SYMBOL(neigh_rand_reach_time); | ||
2826 | EXPORT_SYMBOL(neigh_resolve_output); | ||
2827 | EXPORT_SYMBOL(neigh_table_clear); | ||
2828 | EXPORT_SYMBOL(neigh_table_init); | ||
2829 | EXPORT_SYMBOL(neigh_table_init_no_netlink); | ||
2830 | EXPORT_SYMBOL(neigh_update); | ||
2831 | EXPORT_SYMBOL(pneigh_enqueue); | ||
2832 | EXPORT_SYMBOL(pneigh_lookup); | ||
2833 | EXPORT_SYMBOL_GPL(__pneigh_lookup); | ||
2834 | |||
2835 | #ifdef CONFIG_ARPD | ||
2836 | EXPORT_SYMBOL(neigh_app_ns); | ||
2837 | #endif | ||
2838 | #ifdef CONFIG_SYSCTL | ||
2839 | EXPORT_SYMBOL(neigh_sysctl_register); | ||
2840 | EXPORT_SYMBOL(neigh_sysctl_unregister); | ||
2841 | #endif | ||