]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/udev/net/ethtool-util.h
2 This file is part of systemd.
4 Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 /* we can't use DUPLEX_ prefix, as it
25 * clashes with <linux/ethtool.h> */
33 typedef enum WakeOnLan
{
41 int ethtool_connect(int *ret
);
43 int ethtool_get_driver(int *fd
, const char *ifname
, char **ret
);
44 int ethtool_set_speed(int *fd
, const char *ifname
, unsigned int speed
, Duplex duplex
);
45 int ethtool_set_wol(int *fd
, const char *ifname
, WakeOnLan wol
);
47 const char *duplex_to_string(Duplex d
) _const_
;
48 Duplex
duplex_from_string(const char *d
) _pure_
;
50 const char *wol_to_string(WakeOnLan wol
) _const_
;
51 WakeOnLan
wol_from_string(const char *wol
) _pure_
;
53 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
);
54 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
);