Example #1
0
static void ListAllPorts(int data)
{
	struct PortRecord *pr;

	for (pr = PortList; pr != NULL; pr = pr->Next)
		PrintPortEntry(pr, data);
}
Example #2
0
static void ListOnlyPort(char *name, int data)
{
	struct PortRecord *pr;

	for (pr = PortList; pr != NULL; pr = pr->Next)
		if (strcmp(pr->entry.portname, name) == 0)
			PrintPortEntry(pr, data);
}
Example #3
0
static void ListOnlyPort(int port, int c_index)
{
	struct PortRecord *pr;
	struct PortRecord *pr2;
	int i=0;

	writelog(4, "   --> Sending mheard data for port {%s}",portlist[port].name);
	for (pr = PortList; (pr != NULL) && (i<20) ; ) {
		pr2 = pr;
		if (strcmp(pr->entry.portname, portlist[port].name) == 0)
			{ PrintPortEntry(pr,port,c_index); i++; }
		pr = pr->Next;
		free(pr2);
		}
	PortList=NULL;
	writelog(5, "   --> Sent %i lines heard data",i);
}