Generate IP address string from an unsigned int. ip: unsigned int of form w << 24 | x << 16 | y << 8 | z returns: ip address string w.x.y.z
( ip )
| 379 | return _colonHex( mac, 6 ) |
| 380 | |
| 381 | def ipStr( ip ): |
| 382 | """Generate IP address string from an unsigned int. |
| 383 | ip: unsigned int of form w << 24 | x << 16 | y << 8 | z |
| 384 | returns: ip address string w.x.y.z""" |
| 385 | w = ( ip >> 24 ) & 0xff |
| 386 | x = ( ip >> 16 ) & 0xff |
| 387 | y = ( ip >> 8 ) & 0xff |
| 388 | z = ip & 0xff |
| 389 | return "%i.%i.%i.%i" % ( w, x, y, z ) |
| 390 | |
| 391 | def ipNum( w, x, y, z ): |
| 392 | """Generate unsigned int from components of IP address |
no outgoing calls
no test coverage detected