1111#define __ETHERINFO_OBJ_H
1212
1313#include <Python.h>
14- #include "structmember.h"
15- #include "etherinfo.h"
1614#include "etherinfo_struct.h"
1715
1816void _ethtool_etherinfo_dealloc (etherinfo_py * );
@@ -22,81 +20,4 @@ PyObject *_ethtool_etherinfo_getter(etherinfo_py *, PyObject *);
2220int _ethtool_etherinfo_setter (etherinfo_py * , PyObject * , PyObject * );
2321PyObject * _ethtool_etherinfo_str (etherinfo_py * self );
2422
25- /**
26- * This is required by Python, which lists all accessible methods
27- * in the object. But no methods are provided.
28- *
29- */
30- static PyMethodDef _ethtool_etherinfo_methods [] = {
31- {NULL } /**< No methods defined */
32- };
33-
34- /**
35- * Defines all accessible object members
36- *
37- */
38- static PyMemberDef _ethtool_etherinfo_members [] = {
39- {"device" , T_OBJECT_EX , offsetof(etherinfo_py , data ), 0 ,
40- "Device name of the interface" },
41- {"mac_address" , T_OBJECT_EX , offsetof(etherinfo_py , data ), 0 ,
42- "MAC address / hardware address of the interface" },
43- {"ipv4_address" , T_OBJECT_EX , offsetof(etherinfo_py , data ), 0 ,
44- "IPv4 address" },
45- {"ipv4_netmask" , T_INT , offsetof(etherinfo_py , data ), 0 ,
46- "IPv4 netmask in bits" },
47- {"ipv4_broadcast" , T_OBJECT_EX , offsetof(etherinfo_py , data ), 0 ,
48- "IPv4 broadcast address" },
49- {"ipv6_address" , T_OBJECT_EX , offsetof(etherinfo_py , data ), 0 ,
50- "IPv6 address" },
51- {"ipv6_netmask" , T_INT , offsetof(etherinfo_py , data ), 0 ,
52- "IPv6 netmask in bits" },
53- {NULL } /* End of member list */
54- };
55-
56- /**
57- * Definition of the functions a Python class/object requires.
58- *
59- */
60- PyTypeObject ethtool_etherinfoType = {
61- PyObject_HEAD_INIT (NULL )
62- 0 , /*ob_size*/
63- "ethtool.etherinfo" , /*tp_name*/
64- sizeof (etherinfo_py ), /*tp_basicsize*/
65- 0 , /*tp_itemsize*/
66- (destructor )_ethtool_etherinfo_dealloc ,/*tp_dealloc*/
67- 0 , /*tp_print*/
68- 0 , /*tp_getattr*/
69- 0 , /*tp_setattr*/
70- 0 , /*tp_compare*/
71- 0 , /*tp_repr*/
72- 0 , /*tp_as_number*/
73- 0 , /*tp_as_sequence*/
74- 0 , /*tp_as_mapping*/
75- 0 , /*tp_hash */
76- 0 , /*tp_call*/
77- (reprfunc )_ethtool_etherinfo_str , /*tp_str*/
78- (getattrofunc )_ethtool_etherinfo_getter , /*tp_getattro*/
79- (setattrofunc )_ethtool_etherinfo_setter , /*tp_setattro*/
80- 0 , /*tp_as_buffer*/
81- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /*tp_flags*/
82- "Contains information about a specific ethernet device" , /* tp_doc */
83- 0 , /* tp_traverse */
84- 0 , /* tp_clear */
85- 0 , /* tp_richcompare */
86- 0 , /* tp_weaklistoffset */
87- 0 , /* tp_iter */
88- 0 , /* tp_iternext */
89- _ethtool_etherinfo_methods , /* tp_methods */
90- _ethtool_etherinfo_members , /* tp_members */
91- 0 , /* tp_getset */
92- 0 , /* tp_base */
93- 0 , /* tp_dict */
94- 0 , /* tp_descr_get */
95- 0 , /* tp_descr_set */
96- 0 , /* tp_dictoffset */
97- (initproc )_ethtool_etherinfo_init , /* tp_init */
98- 0 , /* tp_alloc */
99- _ethtool_etherinfo_new , /* tp_new */
100- };
101-
10223#endif
0 commit comments