int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec,

             struct in_addr addr, int port)

{

	struct ex_list *tmp_ptr;



	/* First, check if the port is "bound" */

	for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) {

		if (port == tmp_ptr->ex_fport &&

		    addr.s_addr == tmp_ptr->ex_addr.s_addr)

			return -1;

	}



	tmp_ptr = *ex_ptr;

	*ex_ptr = (struct ex_list *)malloc(sizeof(struct ex_list));

	(*ex_ptr)->ex_fport = port;

	(*ex_ptr)->ex_addr = addr;

	(*ex_ptr)->ex_pty = do_pty;

	(*ex_ptr)->ex_exec = (do_pty == 3) ? exec : strdup(exec);

	(*ex_ptr)->ex_next = tmp_ptr;

	return 0;

}

int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec,

             struct in_addr addr, int port)

{

	struct ex_list *tmp_ptr;



	

	for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) {

		if (port == tmp_ptr->ex_fport &&

		    addr.s_addr == tmp_ptr->ex_addr.s_addr)

			return -1;

	}



	tmp_ptr = *ex_ptr;

	*ex_ptr = (struct ex_list *)malloc(sizeof(struct ex_list));

	(*ex_ptr)->ex_fport = port;

	(*ex_ptr)->ex_addr = addr;

	(*ex_ptr)->ex_pty = do_pty;

	(*ex_ptr)->ex_exec = (do_pty == 3) ? exec : strdup(exec);

	(*ex_ptr)->ex_next = tmp_ptr;

	return 0;

}

	*ex_ptr = (struct ex_list *)malloc(sizeof(struct ex_list)); 	(*ex_ptr)->ex_exec = (do_pty == 3) ? exec : strdup(exec);
int FUNC_0(struct ex_list **VAR_0, int VAR_1, char *VAR_2,

             struct in_addr VAR_3, int VAR_4)

{

	struct ex_list *VAR_5;



	

	for (VAR_5 = *VAR_0; VAR_5; VAR_5 = VAR_5->ex_next) {

		if (VAR_4 == VAR_5->ex_fport &&

		    VAR_3.s_addr == VAR_5->ex_addr.s_addr)

			return -1;

	}



	VAR_5 = *VAR_0;

	*VAR_0 = (struct ex_list *)malloc(sizeof(struct ex_list));

	(*VAR_0)->ex_fport = VAR_4;

	(*VAR_0)->ex_addr = VAR_3;

	(*VAR_0)->ex_pty = VAR_1;

	(*VAR_0)->ex_exec = (VAR_1 == 3) ? VAR_2 : strdup(VAR_2);

	(*VAR_0)->ex_next = VAR_5;

	return 0;

}

int FUNC_0(struct ex_list **VAR_0, int VAR_1, char *VAR_2,
struct in_addr VAR_3, int VAR_4)
{ struct ex_list *VAR_5; for (VAR_5 = *VAR_0; VAR_5; VAR_5 = VAR_5->ex_next) { if (VAR_4 == VAR_5->ex_fport &&
VAR_3.s_addr == VAR_5->ex_addr.s_addr)
return -1; } VAR_5 = *VAR_0; *VAR_0 = (struct ex_list *)malloc(sizeof(struct ex_list)); (*VAR_0)->ex_fport = VAR_4; (*VAR_0)->ex_addr = VAR_3; (*VAR_0)->ex_pty = VAR_1; (*VAR_0)->ex_exec = (VAR_1 == 3) ? VAR_2 : strdup(VAR_2); (*VAR_0)->ex_next = VAR_5; return 0; }