library/src/network/BP-Network.cc
// displays all elements within a proxy information structure.
displays all elements within a proxy information structure.
displays all elements within a proxy information structure .
BP_ERROR_T BP_NetDisplayProxyInfo(P_BP_NETWORK_PROXIES proxy_info)
{
	if(!proxy_info)
		return ERR_FAILURE;
	printf("\n\t [+] Proxy Info: %p", proxy_info);
	printf("\n\t\t proxy_chain:    %p", proxy_info->proxy_chain);
	printf("\n\t\t proxy_chain_n:  %u", proxy_info->proxy_chain_n);
	printf("\n");
	if(!proxy_info->proxy_chain || !proxy_info->proxy_chain_n)
		return ERR_SUCCESS;
	size_t n = 0;
	for(; n < proxy_info->proxy_chain_n; n++)
	{
		BP_NetDisplayProxy(&proxy_info->proxy_chain[n]);
		printf("\n");
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_NetDisplayProxyInfo ( P_BP_NETWORK_PROXIES proxy_info ) { if ( ! proxy_info ) return ERR_FAILURE ; printf ( " \n \t " , proxy_info ) ; printf ( " \n \t \t " , proxy_info -> proxy_chain ) ; printf ( " \n \t \t " , proxy_info -> proxy_chain_n ) ; printf ( " \n " ) ; if ( ! proxy_info -> proxy_chain || ! proxy_info -> proxy_chain_n ) return ERR_SUCCESS ; size_t n = 0 ; for ( ; n < proxy_info -> proxy_chain_n ; n ++ ) { BP_NetDisplayProxy ( & proxy_info -> proxy_chain [ n ] ) ; printf ( " \n " ) ; } return ERR_SUCCESS ; }
displays all elements within a proxy information structure.
displays all elements within a proxy information structure .
// ensure we have proxy information // display proxy information // if we have no proxies in the chain, don't display them // walk chain elements and display proxy information // display the proxy as it's encountered // return indicating success