Changes between Version 49 and Version 50 of kernel_syscalls


Ignore:
Timestamp:
Dec 4, 2016, 8:50:52 PM (8 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_syscalls

    v49 v50  
    165165Returns 0 if success, returns -1 if the socket is not allocated to calling thread.
    166166
    167 === 6) int '''_sys_nic_write'''( unsigned int is_rx,  unsigned int channel ) ===
    168 This function displays on TTY0 the values stored in the NIC instrumentation registers (packet counters).
    169 * '''is_rx''' : boolean (RX channels if non zero)
    170  * '''channel''' : RX or TX channel index
     167=== 6) int '''_sys_nic_write'''( unsigned int index , unsigned int vaddr , unsigned int count ) ===
     168This blocking function moves a RAW packet from the user buffer to the kernel NIC_TX_FIFO, after building the ETH/IP/UDP headers. In this first implementation, we use a polling strategy in case of FIFO full.
     169 * '''index''' : socket index.
     170 * '''vaddr''' : virtual base address of source user buffer.
     171 * '''count''' : number of bytes.
     172Returns number of bytes written if success / returns -1 if error
     173
     174=== 7) int '''_sys_nic_read'''( unsigned int index , unsigned int vaddr , unsigned int count ) ===
     175This blocking function moves a RAW packet from the kernel NIC_RX_FIFO, to the user buffer, after removing the ETH/IP/UDP headers. In this first implementation, we use a polling strategy in case of FIFO empty.
     176 * '''index''' : socket index.
     177 * '''vaddr''' : virtual base address of destination user buffer.
     178 * '''count''' : max number of bytes in user buffer.
     179Returns number of bytes read if success / returns -1 if error
     180
    171181
    172182== FBF related syscall handlers ==