networkd.h revision 71a6151083d842b2f5bf04e50239f0bf85d34d2e
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2013 Tom Gundersen <teg@jklm.no>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
#include <linux/rtnetlink.h>
#include "sd-event.h"
#include "sd-rtnl.h"
#include "udev.h"
#include "rtnl-util.h"
#include "hashmap.h"
#include "list.h"
struct Network {
char *filename;
struct ether_addr *match_mac;
char *match_path;
char *match_driver;
char *match_type;
char *match_name;
char *description;
};
struct Address {
unsigned char family;
unsigned char prefixlen;
char *label;
union {
} in_addr;
};
struct Route {
unsigned char family;
union {
} in_addr;
};
typedef enum LinkState {
_LINK_STATE_INVALID = -1
} LinkState;
struct Link {
struct ether_addr mac;
unsigned flags;
unsigned rtnl_messages;
};
struct Manager {
struct udev_monitor *udev_monitor;
char **network_dirs;
};
/* Manager */
void manager_free(Manager *m);
int manager_udev_enumerate_links(Manager *m);
int manager_udev_listen(Manager *m);
int manager_rtnl_listen(Manager *m);
/* Network */
/* Route */
/* Address */
/* Link */