OpenCores
URL https://opencores.org/ocsvn/amber/amber/trunk

Subversion Repositories amber

[/] [amber/] [trunk/] [sw/] [boot-loader-ethmac/] [telnet.h] - Blame information for rev 81

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 61 csantifort
/*----------------------------------------------------------------
2
//                                                              //
3
//  boot-loader.h                                               //
4
//                                                              //
5
//  This file is part of the Amber project                      //
6
//  http://www.opencores.org/project,amber                      //
7
//                                                              //
8
//  Description                                                 //
9
//  Defines for the boot-loader application.                    //
10
//                                                              //
11
//  Author(s):                                                  //
12
//      - Conor Santifort, csantifort.amber@gmail.com           //
13
//                                                              //
14
//////////////////////////////////////////////////////////////////
15
//                                                              //
16
// Copyright (C) 2010 Authors and OPENCORES.ORG                 //
17
//                                                              //
18
// This source file may be used and distributed without         //
19
// restriction provided that this copyright statement is not    //
20
// removed from the file and that any derivative work contains  //
21
// the original copyright notice and the associated disclaimer. //
22
//                                                              //
23
// This source file is free software; you can redistribute it   //
24
// and/or modify it under the terms of the GNU Lesser General   //
25
// Public License as published by the Free Software Foundation; //
26
// either version 2.1 of the License, or (at your option) any   //
27
// later version.                                               //
28
//                                                              //
29
// This source is distributed in the hope that it will be       //
30
// useful, but WITHOUT ANY WARRANTY; without even the implied   //
31
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
32
// PURPOSE.  See the GNU Lesser General Public License for more //
33
// details.                                                     //
34
//                                                              //
35
// You should have received a copy of the GNU Lesser General    //
36
// Public License along with this source; if not, download it   //
37
// from http://www.opencores.org/lgpl.shtml                     //
38
//                                                              //
39
----------------------------------------------------------------*/
40
 
41
/* Max number of characters to transmit from a line buffer in a single packet */
42
#define MAX_TELNET_TX       1024
43
 
44
 
45 81 csantifort
/* Telnet connection */
46
typedef struct {
47
 
48
    /* Telnet rx and tx line buffers */
49
    line_buf_t*         rxbuf;
50
    line_buf_t*         txbuf;
51
 
52
    int                 sent_opening_message;
53
    int                 echo_mode;
54
    int                 connection_state;
55
    int                 options_sent;
56
 
57
    /* socket associated with this telnet connection */
58
    //socket_t*           socket;
59
 
60
    int                 id;
61
 
62
    /* pointers to the next telnet object in the chain and the first telnet object in the chain */
63
    void*               next;
64
    void*               first;
65
 
66
    /* pointer to application (telnet) object */
67
    app_t*              app;
68
} telnet_t;
69
 
70
 
71
 
72 61 csantifort
void            parse_telnet_options    (char *, socket_t*);
73
void            parse_telnet_payload    (char *, socket_t*);
74
void            telnet_options          (socket_t*);
75
void            telnet_tx               (socket_t*, line_buf_t*);
76 80 csantifort
void            process_telnet          (socket_t*);
77 81 csantifort
int             parse_command           (telnet_t*, char*);
78
void            telnet_disconnect       (app_t *);
79 61 csantifort
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.