예제 #1
0
파일: scap.c 프로젝트: 17twenty/sysdig
int32_t scap_start_dropping_mode(scap_t* handle, uint32_t sampling_ratio)
{
#if !defined(HAS_CAPTURE)
	snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "live capture not supported on %s", PLATFORM_NAME);
	return SCAP_FAILURE;
#else
	return scap_set_dropping_mode(handle, PPM_IOCTL_ENABLE_DROPPING_MODE, sampling_ratio);
#endif
}
예제 #2
0
파일: scap.c 프로젝트: 99plus2/sysdig
int32_t scap_start_dropping_mode(scap_t* handle, uint32_t sampling_ratio)
{
#ifdef _WIN32
	snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "live capture not supported on windows");
	return SCAP_FAILURE;
#elif defined(__APPLE__)
	snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "live capture not supported on OSX");
	return SCAP_FAILURE;
#else
	return scap_set_dropping_mode(handle, PPM_IOCTL_ENABLE_DROPPING_MODE, sampling_ratio);
#endif
}