Changeset b2712e3 in rtems for cpukit/libmisc/shell/shell.h


Ignore:
Timestamp:
May 24, 2001, 9:58:39 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
87fb080d
Parents:
e565720a
Message:

2000-05-24 Fernando Ruiz Casas <fernando.ruiz@…>

  • monitor/mon-prmisc.c: Correct print line.
  • shell/Makefile.am: Added new file telnetd.c.
  • shell/telnetd.c, shell/telnetd.h, shell/pty.c: New files.
  • shell/shell.c, shell/cmds.c, shell/shell.h: Numerous improvments:
    • The shell_init has a new parameter 'forever' because in /dev/console you need that this process runs forever but in tcp/ip not. (respawn?)
    • A new task for every session opened trought tcp/ip telnet client. (the chargen,daytime and more are possible of implementation but I ask me if they are necesary)
    • Exit from the session delete the task and when the client fails too.
    • More cmds have been implemented. (very reduced version of these) umask, chmod, id, whoami, rm, cat, ...
    • A reduced line edit has been implemented.

Ctrl-C abort the input,
Ctrl-d in the first position gives EOF (logout).
'\b' and DEL makes the rubout operation.
I think that readline() for every session spents a lot of resources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/shell.h

    re565720a rb2712e3  
    4646  tcflag_t tcflag;
    4747  /* user extensions */
     48  int  exit_shell; /* logout */
     49  int  forever   ; /* repeat login */
    4850  int  errorlevel;
    4951  int  mdump_adr;
     
    5153
    5254int shell_scanline(char * line,int size,FILE * in,FILE * out) ;
     55void cat_file(FILE * out,char *name);
    5356       
    5457rtems_status_code shell_init(char * task_name      ,
     
    5659                              rtems_task_priority task_priority ,
    5760                              char * devname      ,
    58                               tcflag_t tcflag     );
     61                              tcflag_t tcflag     ,
     62                              int forever         );   
    5963
    6064extern shell_env_t global_shell_env,
    6165                *  current_shell_env;
     66/*--------*/
     67/* pty.c */
     68/*--------*/
     69
     70char * get_pty(int socket);
     71
     72
     73rtems_device_driver pty_initialize(
     74  rtems_device_major_number  major,
     75  rtems_device_minor_number  minor,
     76  void                      *arg);
     77rtems_device_driver pty_open(
     78  rtems_device_major_number major,
     79  rtems_device_minor_number minor,
     80  void                    * arg);
     81rtems_device_driver pty_close(
     82  rtems_device_major_number major,
     83  rtems_device_minor_number minor,
     84  void                    * arg);
     85rtems_device_driver pty_read(
     86  rtems_device_major_number major,
     87  rtems_device_minor_number minor,
     88  void                    * arg);
     89rtems_device_driver pty_write(
     90  rtems_device_major_number major,
     91  rtems_device_minor_number minor,
     92  void                    * arg);
     93rtems_device_driver pty_control(
     94  rtems_device_major_number major,
     95  rtems_device_minor_number minor,
     96  void                    * arg);
     97
     98
     99#define PTY_DRIVER_TABLE_ENTRY \
     100       { pty_initialize , pty_open , pty_close , \
     101         pty_read , pty_write , pty_control }
    62102/*--------*/
    63103/* cmds.c */
Note: See TracChangeset for help on using the changeset viewer.