OpenersNotesSection(Spacer1)Details

MLReleaseNetworkAddressList() is declared in the MathLink header file (RefLink[mathlink.h, paclet:ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* A function that reads the IP addresses available on a machine */

void f(MLENV env)
{
	char **theList = NULL;
	char *tmp;
	unsigned long length;

	theList = MLGetNetworkAddressList(env, &length);

	if(length > 0 && theList != (char **)0)
	{
		while((tmp = *theList++) != (char *)0)
		{
			/* ... */
		}

		MLReleaseNetworkAddressList(env, theList, length);
	}
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLGetNetworkAddressList(), paclet:/ref/c/MLGetNetworkAddressList])  ▪  (NonWLLink[MLGetDomainNameList(), paclet:/ref/c/MLGetDomainNameList])}})}})