src/Cedar/VLanWin32.c
// Read the next packet from the driver

Read the next packet from the driver
Read the next packet from the driver
bool VLanGetPacketsFromDriver(VLAN *v)
{
	DWORD read_size;
	if (v == NULL)
	{
		return false;
	}
	if (v->Halt)
	{
		return false;
	}
	if (v->Win9xMode == false)
	{
		PROBE_STR("VLanGetPacketsFromDriver: ReadFile");
		if (ReadFile(v->Handle, v->GetBuffer, NEO_EXCHANGE_BUFFER_SIZE,
			&read_size, NULL) == false)
		{
			v->Halt = true;
			return false;
		}
	}
	else
	{
		if (DeviceIoControl(v->Handle, NEO_IOCTL_GET_PACKET, NULL, 0,
			v->GetBuffer, NEO_EXCHANGE_BUFFER_SIZE, &read_size, NULL) == false)
		{
			v->Halt = true;
			return false;
		}
	}
	if (read_size != NEO_EXCHANGE_BUFFER_SIZE)
	{
		v->Halt = true;
		return false;
	}
	return true;
}
bool VLanGetPacketsFromDriver ( VLAN * v ) { DWORD read_size ; if ( v == NULL ) { return false ; } if ( v -> Halt ) { return false ; } if ( v -> Win9xMode == false ) { PROBE_STR ( " " ) ; if ( ReadFile ( v -> Handle , v -> GetBuffer , NEO_EXCHANGE_BUFFER_SIZE , & read_size , NULL ) == false ) { v -> Halt = true ; return false ; } } else { if ( DeviceIoControl ( v -> Handle , NEO_IOCTL_GET_PACKET , NULL , 0 , v -> GetBuffer , NEO_EXCHANGE_BUFFER_SIZE , & read_size , NULL ) == false ) { v -> Halt = true ; return false ; } } if ( read_size != NEO_EXCHANGE_BUFFER_SIZE ) { v -> Halt = true ; return false ; } return true ; }
Read the next packet from the driver
Read the next packet from the driver
// Validate arguments
 // Windows NT
 // Windows 9x
