Ignore:
Timestamp:
Nov 19, 2020, 11:44:34 PM (3 years ago)
Author:
alain
Message:

1) Introduce up to 4 command lines arguments in the KSH "load" command.
These arguments are transfered to the user process through the
argc/argv mechanism, using the user space "args" vseg.

2) Introduce the named and anonymous "pipes", for inter-process communication
through the pipe() and mkfifo() syscalls.

3) Introduce the "chat" application to validate the two above mechanisms.

4) Improve printk() and assert() fonctions in printk.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/ksocket.h

    r668 r669  
    440440 * @ fdid      : [in] file descriptor index identifying the local server socket.
    441441 * @ crq_depth : [in] depth of CRQ queue of pending connection requests.
     442 * @ return 0 if success / return -1 if failure
    442443 ***************************************************************************************/
    443444int socket_listen( uint32_t fdid,
     
    549550
    550551/****************************************************************************************
    551  * This blocking function implements the sendto() syscall.
    552  * It registers the <remote_addr> and <remote_port> arguments in the local socket
    553  * descriptor, and does the same thing as the socket_send() function above,
    554  * but can be called  on an unconnected UDP socket.
    555  ****************************************************************************************
    556  * @ fdid        : [in] file descriptor index identifying the socket.
    557  * @ u_buf       : [in] pointer on buffer containing packet in user space.
    558  * @ length      : [in] packet size in bytes.
    559  * @ remote_addr : [in] destination IP address.
    560  * @ remote_port : [in] destination port.
    561  * @ return number of sent bytes if success / return -1 if failure.
    562  ***************************************************************************************/
    563 int socket_sendto( uint32_t    fdid,
    564                    uint8_t   * u_buf,
    565                    uint32_t    length,
    566                    uint32_t    remote_addr,
    567                    uint32_t    remote_port );
    568 
    569 /****************************************************************************************
    570552 * This blocking function implements the recv() syscall.
    571553 * It is used to receive data that has been stored by the NIC_RX server thread in the
     
    594576
    595577/****************************************************************************************
    596  * This blocking function implements the recvfrom() syscall.
    597  * It registers the <remote_addr> and <remote_port> arguments in the local socket
    598  * descriptor, and does the same thing as the socket_recv() function above,
    599  * but can be called on an unconnected UDP socket.
    600  ****************************************************************************************
    601  * @ fdid        : [in] file descriptor index identifying the socket.
    602  * @ u_buf       : [in] pointer on buffer containing packet in user space.
    603  * @ length      : [in] packet size in bytes.
    604  * @ remote_addr : [in] destination IP address.
    605  * @ remote_port : [in] destination port.
    606  * @ return number of received bytes if success / return -1 if failure.
    607  ***************************************************************************************/
    608 int socket_recvfrom( uint32_t    fdid,
    609                      uint8_t   * u_buf,
    610                      uint32_t    length,
    611                      uint32_t    remote_addr,
    612                      uint32_t    remote_port );
    613 
    614 /****************************************************************************************
    615578 * This blocking function implements the close() syscall for a socket.
    616579 * - For a UDP socket, it simply calls the static socket_destroy() function to release
Note: See TracChangeset for help on using the changeset viewer.