C# Class SIPSorcery.Sys.NetServices

Show file Open project: sipsorcery/sipsorcery

Public Properties

Property Type Description
Platform PlatformEnum

Public Methods

Method Description
CallRoute ( ) : string

Calls the operating system command 'route print' to obtain the IP routing information.

CallShellCommand ( string command, string commandLine ) : string
CreateRandomUDPListener ( IPAddress localAddress, IPEndPoint &localEndPoint ) : UdpClient
CreateRandomUDPListener ( IPAddress localAddress, int start, int end, ArrayList inUsePorts, IPEndPoint &localEndPoint ) : UdpClient
CreateRtpSocket ( IPAddress localAddress, int startPort, int endPort, bool createControlSocket, Socket &rtpSocket, Socket &controlSocket ) : void
GetDefaultGateway ( ) : IPAddress

Extracts the default gateway from the route print command

GetDefaultIPAddress ( IPAddress defaultGateway ) : IPAddress

Attempts to get the local IP address that is being used with the default gateway and is therefore the one being used to connect to the internet.

Method Details

CallRoute() public static method

Calls the operating system command 'route print' to obtain the IP routing information.
public static CallRoute ( ) : string
return string

CallShellCommand() public static method

public static CallShellCommand ( string command, string commandLine ) : string
command string
commandLine string
return string

CreateRandomUDPListener() public static method

public static CreateRandomUDPListener ( IPAddress localAddress, IPEndPoint &localEndPoint ) : UdpClient
localAddress System.Net.IPAddress
localEndPoint System.Net.IPEndPoint
return System.Net.Sockets.UdpClient

CreateRandomUDPListener() public static method

public static CreateRandomUDPListener ( IPAddress localAddress, int start, int end, ArrayList inUsePorts, IPEndPoint &localEndPoint ) : UdpClient
localAddress System.Net.IPAddress
start int
end int
inUsePorts System.Collections.ArrayList
localEndPoint System.Net.IPEndPoint
return System.Net.Sockets.UdpClient

CreateRtpSocket() public static method

public static CreateRtpSocket ( IPAddress localAddress, int startPort, int endPort, bool createControlSocket, Socket &rtpSocket, Socket &controlSocket ) : void
localAddress System.Net.IPAddress
startPort int
endPort int
createControlSocket bool
rtpSocket Socket
controlSocket Socket
return void

GetDefaultGateway() public static method

Extracts the default gateway from the route print command
public static GetDefaultGateway ( ) : IPAddress
return System.Net.IPAddress

GetDefaultIPAddress() public static method

Attempts to get the local IP address that is being used with the default gateway and is therefore the one being used to connect to the internet.
public static GetDefaultIPAddress ( IPAddress defaultGateway ) : IPAddress
defaultGateway System.Net.IPAddress
return System.Net.IPAddress

Property Details

Platform public static property

public static PlatformEnum Platform
return PlatformEnum