71 lines
1.6 KiB
C
71 lines
1.6 KiB
C
/*
|
|
* resolv_conf_defs.h
|
|
* This file is part of NetworkInador
|
|
*
|
|
* Copyright (C) 2023 - Félix Arreola Rodríguez
|
|
*
|
|
* NetworkInador is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* NetworkInador is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with NetworkInador; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef __RESOLV_CONF_DEFS_H__
|
|
#define __RESOLV_CONF_DEFS_H__
|
|
|
|
#include <linux/if.h>
|
|
|
|
#include "struct_addr_union.h"
|
|
|
|
/* Cosas del resolv.conf */
|
|
enum {
|
|
RESOLV_TYPE_NAMESERVER,
|
|
RESOLV_TYPE_DOMAIN,
|
|
RESOLV_TYPE_SEARCH,
|
|
RESOLV_TYPE_SORTLIST,
|
|
RESOLV_TYPE_OPTIONS,
|
|
|
|
NUM_RESOLV_TYPES
|
|
};
|
|
|
|
enum {
|
|
RESOLV_ORIGIN_FILE,
|
|
RESOLV_ORIGIN_DHCP,
|
|
RESOLV_ORIGIN_RESOLVCONF,
|
|
|
|
RESOLV_ORIGIN_SLAAC_RDNSS,
|
|
|
|
NUM_RESOLV_ORIGINS
|
|
};
|
|
|
|
typedef struct _ResolvConfEntry {
|
|
int resolv_type;
|
|
int origin;
|
|
|
|
int file_order;
|
|
int tagged;
|
|
int for_purge;
|
|
int priority;
|
|
|
|
int ns_family;
|
|
struct_addr nameserver;
|
|
char value[2048];
|
|
|
|
//char owner_interface[IFNAMSIZ];
|
|
int owner_interface_index;
|
|
char owner_prog[256];
|
|
} ResolvConfEntry;
|
|
|
|
#endif /* __RESOLV_CONF_DEFS_H__ */
|
|
|