File: etherinfo.h

package info (click to toggle)
python-ethtool 0.14-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 324 kB
  • sloc: ansic: 1,770; python: 1,509; makefile: 24; sh: 16
file content (30 lines) | stat: -rw-r--r-- 965 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* etherinfo.h - Retrieve ethernet interface info via NETLINK
 *
 * Copyright (C) 2009-2011 Red Hat Inc.
 *
 * David Sommerseth <davids@redhat.com>
 *
 * This application 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; version 2.
 *
 * This application 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.
 */

#ifndef _ETHERINFO_H
#define _ETHERINFO_H

/** Supported query types in the etherinfo code */
typedef enum {NLQRY_ADDR4, NLQRY_ADDR6} nlQuery;

int get_etherinfo_link(PyEtherInfo *data);
PyObject * get_etherinfo_address(PyEtherInfo *self, nlQuery query);

int open_netlink(PyEtherInfo *);
struct nl_sock * get_nlc(void);
void close_netlink(PyEtherInfo *);

#endif