Changes between Version 158 and Version 159 of library_stdio


Ignore:
Timestamp:
Dec 31, 2016, 2:37:45 PM (8 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v158 v159  
    430430
    431431 === 5) int '''giet_nic_sendto'''( int socket , void * buffer , int length , int flags , sockaddr_t * dest_addr , int addr_len ) ===
    432 This blocking function moves one ''raw'' packet from an user buffer defined by the <buffer> argument to a kernel buffer. The packet length (in bytes) is defned by the <length> arguments. It uses the the <socket> and <dest_addr> arguments to build the ETH/IP/UDP header. It returns only when the user buffer can be re-used. The user thread blocking uses a descheduling policy.
     432This blocking function moves one ''raw'' packet from an user buffer defined by the <buffer> argument to a kernel buffer. The packet length (in bytes) is defned by the <length> arguments. The destination socket is defined by the <remote_addr> argument. It uses the <socket> and <remote_addr> arguments to build the ETH/IP/UDP header. It returns only when the user buffer can be re-used, and uses a descheduling policy for blocking.
    433433 * '''socket''' : socket identifier.
    434434 * '''buffer''' : pointer on user buffer.
    435435 * '''length''' : raw packet length (bytes).
    436436 * '''flags''' : unsupported / must be 0.
    437  * '''dest_addr''' : remote socket address.
     437 * '''remote_addr''' : pointer on remote socket address.
    438438 * '''addr_len''' : unused.
    439439 * return 0 if success / returns -1 if error.
    440440
    441  === 6) int '''giet_nic_recvfrom'''( int socket , void * buffer , int length , int flags , sockaddr_t * dest_addr , int * addr_len ) ===
    442 This blocking function moves one ''raw'' packet from a kernel buffer to an user buffer defined by the <buffer> argument. The <length> argument define the user buffer size (in bytes). Packets exceeding this size are discarded. Only packets matching the local IP address and local port number, defined by the <socket> argument will be delivered (2 matching conditions). If the socket is in ''connected'' mode, the matching must also be on remote IP address an remote port number (4 matching conditions). The remote socket address is returned in the <dest_addr> argument. It returns only when the user buffer has been written. The user thread blocking uses a descheduling policy.
     441 === 6) int '''giet_nic_recvfrom'''( int socket , void * buffer , int length , int flags , sockaddr_t * dest_addr , int * pkt_len ) ===
     442This blocking function moves one ''raw'' packet from a kernel buffer to an user buffer defined by the <buffer> argument. The <size> argument define the user buffer size and must be larger than 2 Kbytes. Only packets matching the local IP address and local port number, defined by the <socket> argument will be delivered (2 matching conditions). If the socket is in ''connected'' mode, the matching must also be on remote IP address an remote port number (4 matching conditions). The remote socket address is returned in the <src_addr> argument. The actual received packet length
     443is returned in the <length> argument. It returns only when the user buffer has been written, and uses a descheduling policy for blocking.
    443444 * '''socket''' : socket identifier.
    444445 * '''buffer''' : pointer on user buffer.
    445  * '''length''' : raw packet length (bytes).
     446 * '''size''' : buffer size (bytes).
    446447 * '''flags''' : unsupported / must be 0.
    447  * '''dest_addr''' : pointer on remote socket address.
    448  * '''addr_len''' : unused.
     448 * '''src_addr''' : pointer on remote socket address.
     449 * '''length''' : pointer on received packet length (bytes).
    449450 * return 0 if success / returns -1 if error.
    450451
    451  === 7) int '''giet_nic_write'''( int socket , void * buffer , int length void* buffer ) ===
    452 This blocking function makes the same as the giet_nic_sendto() function, with only one difference: the remote socket address must have been previously registered in the local socket descriptor using the giet_nic_connect() function.
    453  * '''socket''' : socket identifier.
    454  * '''buffer''' : pointer on user buffer.
    455  * '''length''' : raw packet length (bytes).
    456  * returns 0 if success / returns -1 if error.
    457 
    458  === 8) void '''giet_nic_read'''( int socket , void * buffer , int length void* buffer ) ===
    459 This blocking function makes the same as the giet_nic_recvfrom() function, with two differences: (i) the remote socket address must have been previously registered in the local socket descriptor using the giet_nic_connect() function, (ii) the matching condition is computed on 4 conditions: local IP address, local port number, remote IP addresses, remote port number.
    460  * '''socket''' : socket identifier.
    461  * '''buffer''' : pointer on user buffer.
    462  * '''length''' : raw packet length (bytes).
    463  * returns 0 if success / returns -1 if error.
    464 
    465  === 9) void '''giet_nic_print_stats'''( ) ===
     452 === 7) void '''giet_nic_print_stats'''( ) ===
    466453This function  print on the calling thread terminal the current values of the hardware NIC instrumentation counters.
    467454
    468  === 10) void '''giet_nic_clear_stats'''( ) ===
     455 === 8) void '''giet_nic_clear_stats'''( ) ===
    469456This function reset all Hardware NIC instrumentation counters.
    470457