int main(int argc, char *argv[]){
	
	ms_init();
	if (argc<2){
		ms_error("Usage: mtudiscover [host]");
		return -1;
	}
	ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
	printf("result: %i \n",ms_discover_mtu(argv[1]));
	return 0;
}
Ejemplo n.º 2
0
static void discover_mtu(LinphoneCore *lc, const char *remote){
	int mtu;
	if (lc->net_conf.mtu==0	){
		/*attempt to discover mtu*/
		mtu=ms_discover_mtu(remote);
		if (mtu>0){
			ms_set_mtu(mtu);
			ms_message("Discovered mtu is %i, RTP payload max size is %i",
				mtu, ms_get_payload_max_size());
		}
	}
}