]>
git.proxmox.com Git - systemd.git/blob - src/udev/net/ethtool-util.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
4 This file is part of systemd.
6 Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
26 /* we can't use DUPLEX_ prefix, as it
27 * clashes with <linux/ethtool.h> */
35 typedef enum WakeOnLan
{
43 int ethtool_connect(int *ret
);
45 int ethtool_get_driver(int *fd
, const char *ifname
, char **ret
);
46 int ethtool_set_speed(int *fd
, const char *ifname
, unsigned int speed
, Duplex duplex
);
47 int ethtool_set_wol(int *fd
, const char *ifname
, WakeOnLan wol
);
49 const char *duplex_to_string(Duplex d
) _const_
;
50 Duplex
duplex_from_string(const char *d
) _pure_
;
52 const char *wol_to_string(WakeOnLan wol
) _const_
;
53 WakeOnLan
wol_from_string(const char *wol
) _pure_
;
55 int config_parse_duplex(const char *unit
, const char *filename
, unsigned line
, const char *section
, unsigned section_line
, const char *lvalue
, int ltype
, const char *rvalue
, void *data
, void *userdata
);
56 int config_parse_wol(const char *unit
, const char *filename
, unsigned line
, const char *section
, unsigned section_line
, const char *lvalue
, int ltype
, const char *rvalue
, void *data
, void *userdata
);