Beispiel #1
0
long spark_rhine_transmit(char *buffer, unsigned int size)
{
        int iProcessId;
        memcpy(stackdata, (unsigned char *)((unsigned long)buffer + guestOS_thread[iCurrGuestOsIndex].phyOffset), size);
        enable_pagebit(); 
	rhine_xmit(stackdata, size);
        iProcessId = guestOS_thread[iCurrGuestOsIndex].iCurrTaskId;
        load_pde(iProcessId);
	return 0;
}
Beispiel #2
0
static ssize_t rhine_write(dev_cookie cookie, const void *buf, off_t pos, ssize_t len)
{
	rhine *r = (rhine *)cookie;

	if(len > ETHERNET_MAX_SIZE)
		return ERR_VFS_INSUFFICIENT_BUF;
	if(len < 0)
		return ERR_INVALID_ARGS;

	rhine_xmit(r, buf, len);
	return len;
}