This file is indexed.

/usr/include/rsbac/network_types.h is in librsbac-dev 1.4.0-repack-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/************************************* */
/* Rule Set Based Access Control       */
/* Author and (c) 1999-2005:           */
/*   Amon Ott <ao@rsbac.org>           */
/* Network access control data structs */
/* Last modified: 21/Dec/2005          */
/************************************* */

#ifndef __RSBAC_NETWORK_TYPES_H
#define __RSBAC_NETWORK_TYPES_H

#define RSBAC_NET_ANY 0
#define RSBAC_NET_UNKNOWN 0

#define RSBAC_NET_TEMP_VERSION 2
#define RSBAC_NET_TEMP_OLD_VERSION 1
#define RSBAC_NET_TEMP_KEY 0x815affe
#define RSBAC_NET_TEMP_NAME "nettemp"

typedef __u32 rsbac_net_temp_id_t;

#define RSBAC_NET_MAX_ADDRESS_LEN 128
#define RSBAC_NET_TEMP_NAMELEN 16

#define RSBAC_NET_MAX_PORT 65535

#define RSBAC_NET_NR_INET_ADDR 25
#define RSBAC_NET_NR_PORTS 10

struct rsbac_net_temp_port_range_t {
	__u16 min;
	__u16 max;
};

struct rsbac_net_temp_inet_addr_t {
	__u32 addr[RSBAC_NET_NR_INET_ADDR];
	__u8 valid_bits[RSBAC_NET_NR_INET_ADDR];
	__u8 nr_addr;
};

struct rsbac_net_temp_other_addr_t {
	char addr[RSBAC_NET_MAX_ADDRESS_LEN];
	__u8 valid_len;
};

struct rsbac_net_temp_ports_t {
	struct rsbac_net_temp_port_range_t ports[RSBAC_NET_NR_PORTS];
	__u8 nr_ports;
};

union rsbac_net_temp_addr_t {
	struct rsbac_net_temp_inet_addr_t inet;
	struct rsbac_net_temp_other_addr_t other;
};

struct rsbac_net_temp_data_t {
	/* must be first for alignment */
	union rsbac_net_temp_addr_t address;
	__u8 address_family;
	__u8 type;
	__u8 protocol;
	rsbac_netdev_id_t netdev;
	struct rsbac_net_temp_ports_t ports;	/* for those address families that support them */
	char name[RSBAC_NET_TEMP_NAMELEN];
};

struct rsbac_net_temp_old_data_t {
	/* must be first for alignment */
	char address[RSBAC_NET_MAX_ADDRESS_LEN];
	__u8 address_family;
	__u8 valid_len;		/* Bytes for AF_UNIX, Bits for all others */
	__u8 type;
	__u8 protocol;
	rsbac_netdev_id_t netdev;
	__u16 min_port;		/* for those address families that support them */
	__u16 max_port;
	char name[RSBAC_NET_TEMP_NAMELEN];
};

#define RSBAC_NET_TEMP_LNET_ID 100101
#define RSBAC_NET_TEMP_LNET_ADDRESS "127.0.0.0"
#define RSBAC_NET_TEMP_LAN_ID 100102
#define RSBAC_NET_TEMP_LAN_ADDRESS "192.168.0.0"
#define RSBAC_NET_TEMP_AUTO_ID 100105
#define RSBAC_NET_TEMP_AUTO_ADDRESS "0.0.0.0"
#define RSBAC_NET_TEMP_INET_ID 100110
#define RSBAC_NET_TEMP_ALL_ID ((rsbac_net_temp_id_t) -1)

/* default templates moved into aci_data_structures.c */

struct rsbac_net_description_t {
	__u8 address_family;
	void *address;
	__u8 address_len;
	__u8 type;
	__u8 protocol;
	rsbac_netdev_id_t netdev;
	__u16 port;
};

enum rsbac_net_temp_syscall_t {
	NTS_new_template,
	NTS_copy_template,
	NTS_delete_template,
	NTS_check_id,
	NTS_get_address,
	NTS_get_address_family,
	NTS_get_type,
	NTS_get_protocol,
	NTS_get_netdev,
	NTS_get_ports,
	NTS_get_name,
	NTS_set_address,
	NTS_set_address_family,
	NTS_set_type,
	NTS_set_protocol,
	NTS_set_netdev,
	NTS_set_ports,
	NTS_set_name,
	NTS_none
};

union rsbac_net_temp_syscall_data_t {
	rsbac_net_temp_id_t id;
	union rsbac_net_temp_addr_t address;
	__u8 address_family;
	__u8 type;
	__u8 protocol;
	rsbac_netdev_id_t netdev;
	struct rsbac_net_temp_ports_t ports;	/* for those address families that support them */
	char name[RSBAC_NET_TEMP_NAMELEN];
};

/*
 *      Display an IP address in readable format.
 */

#ifndef NIPQUAD
#define NIPQUAD(addr) \
	((unsigned char *)&addr)[0], \
	((unsigned char *)&addr)[1], \
	((unsigned char *)&addr)[2], \
	((unsigned char *)&addr)[3]

#define HIPQUAD(addr) \
	((unsigned char *)&addr)[3], \
	((unsigned char *)&addr)[2], \
	((unsigned char *)&addr)[1], \
	((unsigned char *)&addr)[0]
#endif

#endif