s3-spoolss: implement spoolss_EnumJobs level 3.
[Samba.git] / source3 / include / interfaces.h
blob6ba0e21f6dd1fbe9870b192c18ed4288b3d348cb
1 /*
2 Unix SMB/CIFS implementation.
3 Machine customisation and include handling
4 Copyright (C) Jeremy Allison <jra@samba.org> 2007
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.
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.
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/>.
20 This structure is used by lib/interfaces.c to return the list of network
21 interfaces on the machine
24 #ifndef _INTERFACES_H
25 #define _INTERFACES_H
27 #include "../replace/replace.h"
28 #include "../replace/system/network.h"
30 struct iface_struct {
31 char name[16];
32 int flags;
33 struct sockaddr_storage ip;
34 struct sockaddr_storage netmask;
35 struct sockaddr_storage bcast;
38 bool make_netmask(struct sockaddr_storage *pss_out,
39 const struct sockaddr_storage *pss_in,
40 unsigned long masklen);
41 void make_bcast(struct sockaddr_storage *pss_out,
42 const struct sockaddr_storage *pss_in,
43 const struct sockaddr_storage *nmask);
44 void make_net(struct sockaddr_storage *pss_out,
45 const struct sockaddr_storage *pss_in,
46 const struct sockaddr_storage *nmask);
47 int get_interfaces(TALLOC_CTX *mem_ctx, struct iface_struct **pifaces);
49 #endif