core.h 2.95 KB
Newer Older
Per Liden's avatar
Per Liden committed
1
2
/*
 * net/tipc/core.h: Include file for TIPC global declarations
3
 *
4
5
 * Copyright (c) 2005-2006, 2013 Ericsson AB
 * Copyright (c) 2005-2007, 2010-2013, Wind River Systems
Per Liden's avatar
Per Liden committed
6
7
 * All rights reserved.
 *
Per Liden's avatar
Per Liden committed
8
 * Redistribution and use in source and binary forms, with or without
Per Liden's avatar
Per Liden committed
9
10
 * modification, are permitted provided that the following conditions are met:
 *
Per Liden's avatar
Per Liden committed
11
12
13
14
15
16
17
18
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the names of the copyright holders nor the names of its
 *    contributors may be used to endorse or promote products derived from
 *    this software without specific prior written permission.
Per Liden's avatar
Per Liden committed
19
 *
Per Liden's avatar
Per Liden committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Per Liden's avatar
Per Liden committed
34
35
36
37
38
39
 * POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _TIPC_CORE_H
#define _TIPC_CORE_H

Jon Maloy's avatar
Jon Maloy committed
40
41
#include <linux/tipc.h>
#include <linux/tipc_config.h>
42
#include <linux/tipc_netlink.h>
Per Liden's avatar
Per Liden committed
43
44
45
46
47
48
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/timer.h>
#include <linux/string.h>
49
#include <linux/uaccess.h>
Per Liden's avatar
Per Liden committed
50
#include <linux/interrupt.h>
Arun Sharma's avatar
Arun Sharma committed
51
#include <linux/atomic.h>
Per Liden's avatar
Per Liden committed
52
53
#include <asm/hardirq.h>
#include <linux/netdevice.h>
54
#include <linux/in.h>
Per Liden's avatar
Per Liden committed
55
#include <linux/list.h>
56
#include <linux/slab.h>
Per Liden's avatar
Per Liden committed
57
#include <linux/vmalloc.h>
58
#include <linux/rtnetlink.h>
59
#include <linux/etherdevice.h>
60
61
62

#define TIPC_MOD_VER "2.0.0"

63
int tipc_snprintf(char *buf, int len, const char *fmt, ...);
64

Per Liden's avatar
Per Liden committed
65
66
67
/*
 * Global configuration variables
 */
68
69
extern u32 tipc_own_addr __read_mostly;
extern int tipc_net_id __read_mostly;
70
extern int sysctl_tipc_rmem[3] __read_mostly;
71
extern int sysctl_tipc_named_timeout __read_mostly;
Per Liden's avatar
Per Liden committed
72
73
74
75

/*
 * Other global variables
 */
76
extern int tipc_random __read_mostly;
Per Liden's avatar
Per Liden committed
77

78
#ifdef CONFIG_SYSCTL
79
80
int tipc_register_sysctl(void);
void tipc_unregister_sysctl(void);
81
82
83
84
85
#else
#define tipc_register_sysctl() 0
#define tipc_unregister_sysctl()
#endif

86
#endif