Package elisa :: Package core :: Package utils :: Module network

Module network

source code

Functions to retrieve hostname and IP address of the machine running Elisa

Functions
string
get_host_address()
Retrieve current host address for Win32 and Linux platforms
source code
string
get_ip_address(ifname=None)
Retrieve IP address of the given network interface, on a Windows platform
source code
Variables
  __maintainer__ = 'Philippe Normand <philippe@fluendo.com>'

Imports: socket, struct, platform


Function Details

get_host_address()

source code 

Retrieve current host address for Win32 and Linux platforms

Returns: string
Raises:
  • ValueError - if current system's platform is not windows or linux

get_ip_address(ifname=None)

source code 

Retrieve IP address of the given network interface, on a Windows platform

Parameters:
  • ifname (string) - network interface name
Returns: string
Raises:
  • ValueError - if current system's platform is not windows or linux