source: branches/samba-3.3.x/source/include/interfaces.h@ 309

Last change on this file since 309 was 206, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.0.0 level (psmedley's port)

File size: 1.6 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Machine customisation and include handling
4 Copyright (C) Jeremy Allison <jra@samba.org> 2007
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19/*
20 This structure is used by lib/interfaces.c to return the list of network
21 interfaces on the machine
22*/
23
24#ifndef _INTERFACES_H
25#define _INTERFACES_H
26
27#include "lib/replace/replace.h"
28#include "lib/replace/system/network.h"
29
30#define MAX_INTERFACES 128
31
32struct iface_struct {
33 char name[16];
34 int flags;
35 struct sockaddr_storage ip;
36 struct sockaddr_storage netmask;
37 struct sockaddr_storage bcast;
38};
39
40bool make_netmask(struct sockaddr_storage *pss_out,
41 const struct sockaddr_storage *pss_in,
42 unsigned long masklen);
43void make_bcast(struct sockaddr_storage *pss_out,
44 const struct sockaddr_storage *pss_in,
45 const struct sockaddr_storage *nmask);
46void make_net(struct sockaddr_storage *pss_out,
47 const struct sockaddr_storage *pss_in,
48 const struct sockaddr_storage *nmask);
49int get_interfaces(struct iface_struct *ifaces, int max_interfaces);
50
51#endif
Note: See TracBrowser for help on using the repository browser.