core.c (186a73dc9a81b087d0708f21a990615957ec9c1c) | core.c (52ff872055e06af10f94b8853c946f07ed8a0672) |
---|---|
1/* 2 * net/tipc/core.c: TIPC module code 3 * 4 * Copyright (c) 2003-2006, 2013, Ericsson AB 5 * Copyright (c) 2005-2006, 2010-2013, Wind River Systems 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 66 unchanged lines hidden (view full) --- 75 return skb; 76} 77 78/** 79 * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode 80 */ 81static void tipc_core_stop(void) 82{ | 1/* 2 * net/tipc/core.c: TIPC module code 3 * 4 * Copyright (c) 2003-2006, 2013, Ericsson AB 5 * Copyright (c) 2005-2006, 2010-2013, Wind River Systems 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 66 unchanged lines hidden (view full) --- 75 return skb; 76} 77 78/** 79 * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode 80 */ 81static void tipc_core_stop(void) 82{ |
83 tipc_handler_stop(); | |
84 tipc_net_stop(); 85 tipc_bearer_cleanup(); 86 tipc_netlink_stop(); 87 tipc_subscr_stop(); 88 tipc_nametbl_stop(); 89 tipc_ref_table_stop(); 90 tipc_socket_stop(); 91 tipc_unregister_sysctl(); 92} 93 94/** 95 * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode 96 */ 97static int tipc_core_start(void) 98{ 99 int err; 100 101 get_random_bytes(&tipc_random, sizeof(tipc_random)); 102 | 83 tipc_net_stop(); 84 tipc_bearer_cleanup(); 85 tipc_netlink_stop(); 86 tipc_subscr_stop(); 87 tipc_nametbl_stop(); 88 tipc_ref_table_stop(); 89 tipc_socket_stop(); 90 tipc_unregister_sysctl(); 91} 92 93/** 94 * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode 95 */ 96static int tipc_core_start(void) 97{ 98 int err; 99 100 get_random_bytes(&tipc_random, sizeof(tipc_random)); 101 |
103 err = tipc_handler_start(); 104 if (err) 105 goto out_handler; 106 | |
107 err = tipc_ref_table_init(tipc_max_ports, tipc_random); 108 if (err) 109 goto out_reftbl; 110 111 err = tipc_nametbl_init(); 112 if (err) 113 goto out_nametbl; 114 --- 26 unchanged lines hidden (view full) --- 141 tipc_socket_stop(); 142out_socket: 143 tipc_netlink_stop(); 144out_netlink: 145 tipc_nametbl_stop(); 146out_nametbl: 147 tipc_ref_table_stop(); 148out_reftbl: | 102 err = tipc_ref_table_init(tipc_max_ports, tipc_random); 103 if (err) 104 goto out_reftbl; 105 106 err = tipc_nametbl_init(); 107 if (err) 108 goto out_nametbl; 109 --- 26 unchanged lines hidden (view full) --- 136 tipc_socket_stop(); 137out_socket: 138 tipc_netlink_stop(); 139out_netlink: 140 tipc_nametbl_stop(); 141out_nametbl: 142 tipc_ref_table_stop(); 143out_reftbl: |
149 tipc_handler_stop(); 150out_handler: | |
151 return err; 152} 153 154static int __init tipc_init(void) 155{ 156 int res; 157 158 pr_info("Activated (version " TIPC_MOD_VER ")\n"); --- 30 unchanged lines hidden --- | 144 return err; 145} 146 147static int __init tipc_init(void) 148{ 149 int res; 150 151 pr_info("Activated (version " TIPC_MOD_VER ")\n"); --- 30 unchanged lines hidden --- |