src/Cedar/VLanWin32.c
// Write all the current packets to the driver

Write all the current packets to the driver
Write all the current packets to the driver
bool VLanPutPacketsToDriver(VLAN *v)
{
	DWORD write_size;
	if (v == NULL)
	{
		return false;
	}
	if (v->Halt)
	{
		return false;
	}
	if (v->Win9xMode == false)
	{
		PROBE_STR("VLanPutPacketsToDriver: WriteFile");
		if (WriteFile(v->Handle, v->PutBuffer, NEO_EXCHANGE_BUFFER_SIZE, &write_size,
			NULL) == false)
		{
			v->Halt = true;
			return false;
		}
		PROBE_STR("VLanPutPacketsToDriver: WriteFile Completed.");
		if (write_size != NEO_EXCHANGE_BUFFER_SIZE)
		{
			v->Halt = true;
			return false;
		}
	}
	else
	{
		if (DeviceIoControl(v->Handle, NEO_IOCTL_PUT_PACKET, v->PutBuffer,
			NEO_EXCHANGE_BUFFER_SIZE, NULL, 0, &write_size, NULL) == false)
		{
			v->Halt = true;
			return false;
		}
	}
	return true;
}
bool VLanPutPacketsToDriver ( VLAN * v ) { DWORD write_size ; if ( v == NULL ) { return false ; } if ( v -> Halt ) { return false ; } if ( v -> Win9xMode == false ) { PROBE_STR ( " " ) ; if ( WriteFile ( v -> Handle , v -> PutBuffer , NEO_EXCHANGE_BUFFER_SIZE , & write_size , NULL ) == false ) { v -> Halt = true ; return false ; } PROBE_STR ( " " ) ; if ( write_size != NEO_EXCHANGE_BUFFER_SIZE ) { v -> Halt = true ; return false ; } } else { if ( DeviceIoControl ( v -> Handle , NEO_IOCTL_PUT_PACKET , v -> PutBuffer , NEO_EXCHANGE_BUFFER_SIZE , NULL , 0 , & write_size , NULL ) == false ) { v -> Halt = true ; return false ; } } return true ; }
Write all the current packets to the driver
Write all the current packets to the driver
// Validate arguments
 // Windows NT
 // Windows 9x
