3434/**
3535 * ethtool.etherinfo deallocator - cleans up when a object is deleted
3636 *
37- * @param self etherinfo_py Python object to deallocate
37+ * @param self PyEtherInfo Python object to deallocate
3838 */
39- static void _ethtool_etherinfo_dealloc (etherinfo_py * self )
39+ static void _ethtool_etherinfo_dealloc (PyEtherInfo * self )
4040{
4141 close_netlink (self );
4242 Py_XDECREF (self -> device ); self -> device = NULL ;
@@ -79,12 +79,12 @@ static PyNetlinkIPaddress * get_last_ipv4_address(PyObject *addrlist)
7979/**
8080 * ethtool.etherinfo function for retrieving data from a Python object.
8181 *
82- * @param self Pointer to the current etherinfo_py device object
82+ * @param self Pointer to the current PyEtherInfo device object
8383 * @param attr_o contains the object member request (which element to return)
8484 *
8585 * @return Returns a PyObject with the value requested on success, otherwise NULL
8686 */
87- PyObject * _ethtool_etherinfo_getter (etherinfo_py * self , PyObject * attr_o )
87+ PyObject * _ethtool_etherinfo_getter (PyEtherInfo * self , PyObject * attr_o )
8888{
8989 char * attr = PyString_AsString (attr_o );
9090 PyNetlinkIPaddress * py_addr ;
@@ -149,7 +149,7 @@ PyObject *_ethtool_etherinfo_getter(etherinfo_py *self, PyObject *attr_o)
149149 *
150150 * @return Returns always -1 (failure).
151151 */
152- int _ethtool_etherinfo_setter (etherinfo_py * self , PyObject * attr_o , PyObject * val_o )
152+ int _ethtool_etherinfo_setter (PyEtherInfo * self , PyObject * attr_o , PyObject * val_o )
153153{
154154 PyErr_SetString (PyExc_AttributeError , "etherinfo member values are read-only." );
155155 return -1 ;
@@ -159,11 +159,11 @@ int _ethtool_etherinfo_setter(etherinfo_py *self, PyObject *attr_o, PyObject *va
159159/**
160160 * Creates a human readable format of the information when object is being treated as a string
161161 *
162- * @param self Pointer to the current etherinfo_py device object
162+ * @param self Pointer to the current PyEtherInfo device object
163163 *
164164 * @return Returns a PyObject with a string with all of the information
165165 */
166- PyObject * _ethtool_etherinfo_str (etherinfo_py * self )
166+ PyObject * _ethtool_etherinfo_str (PyEtherInfo * self )
167167{
168168 PyObject * ret = NULL ;
169169 PyObject * ipv4addrs = NULL , * ipv6addrs = NULL ;
@@ -224,12 +224,12 @@ PyObject *_ethtool_etherinfo_str(etherinfo_py *self)
224224/**
225225 * Returns a tuple list of configured IPv4 addresses
226226 *
227- * @param self Pointer to the current etherinfo_py device object to extract IPv4 info from
227+ * @param self Pointer to the current PyEtherInfo device object to extract IPv4 info from
228228 * @param notused
229229 *
230230 * @return Returns a Python tuple list of NetlinkIP4Address objects
231231 */
232- static PyObject * _ethtool_etherinfo_get_ipv4_addresses (etherinfo_py * self , PyObject * notused ) {
232+ static PyObject * _ethtool_etherinfo_get_ipv4_addresses (PyEtherInfo * self , PyObject * notused ) {
233233 if ( !self ) {
234234 PyErr_SetString (PyExc_AttributeError , "No data available" );
235235 return NULL ;
@@ -242,12 +242,12 @@ static PyObject *_ethtool_etherinfo_get_ipv4_addresses(etherinfo_py *self, PyObj
242242/**
243243 * Returns a tuple list of configured IPv6 addresses
244244 *
245- * @param self Pointer to the current etherinfo_py device object to extract IPv6 info from
245+ * @param self Pointer to the current PyEtherInfo device object to extract IPv6 info from
246246 * @param notused
247247 *
248248 * @return Returns a Python tuple list of NetlinkIP6Address objects
249249 */
250- static PyObject * _ethtool_etherinfo_get_ipv6_addresses (etherinfo_py * self , PyObject * notused ) {
250+ static PyObject * _ethtool_etherinfo_get_ipv6_addresses (PyEtherInfo * self , PyObject * notused ) {
251251 if ( !self ) {
252252 PyErr_SetString (PyExc_AttributeError , "No data available" );
253253 return NULL ;
@@ -273,10 +273,10 @@ static PyMethodDef _ethtool_etherinfo_methods[] = {
273273 * Definition of the functions a Python class/object requires.
274274 *
275275 */
276- PyTypeObject ethtool_etherinfoType = {
276+ PyTypeObject PyEtherInfo_Type = {
277277 PyObject_HEAD_INIT (NULL )
278278 .tp_name = "ethtool.etherinfo" ,
279- .tp_basicsize = sizeof (etherinfo_py ),
279+ .tp_basicsize = sizeof (PyEtherInfo ),
280280 .tp_flags = Py_TPFLAGS_HAVE_CLASS ,
281281 .tp_dealloc = (destructor )_ethtool_etherinfo_dealloc ,
282282 .tp_str = (reprfunc )_ethtool_etherinfo_str ,
0 commit comments