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

Subversion Repositories amber

[/] [amber/] [trunk/] [sw/] [boot-loader-ethmac/] [tcp.h] - Diff between revs 61 and 80

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 61 Rev 80
Line 51... Line 51...
        TCP_NORMAL      = 1,
        TCP_NORMAL      = 1,
        TCP_RESET       = 2
        TCP_RESET       = 2
};
};
 
 
 
 
 
typedef struct {
 
 
 
    packet_buffer_t** tcp_buf;
 
    int          tcp_current_buf;
 
 
 
    /* Telnet rx and tx line buffers */
 
    line_buf_t*  telnet_rxbuf;
 
    line_buf_t*  telnet_txbuf;
 
 
 
    int          telnet_sent_opening_message;
 
    int          telnet_echo_mode;
 
    int          telnet_connection_state;
 
    int          telnet_options_sent;
 
 
 
    int          packets_sent;
 
    int          packets_received;
 
    int          packets_resent;
 
 
 
    int          tcp_connection_state;
 
    int          tcp_reset;
 
    int          tcp_disconnect;
 
    int          tcp_seq;            /* should be random initial seq number for tcp */
 
    int          tcp_last_seq;
 
    unsigned int tcp_last_ack;
 
 
 
    int          id;
 
 
 
    packet_t*    rx_packet;  /* Header info from last packet received */
 
 
 
    /* pointers to the next socket in the chain and the first socket in the chain */
 
    void*        next;
 
    void*        first;
 
} socket_t;
 
 
 
 
 
/* Global Variables */
 
extern socket_t*    first_socket_g;
 
extern int          tcp_checksum_errors_g;
 
 
 
 
 
/* Function prototypes */
 
socket_t*       new_socket              (socket_t* prev);
 
 
unsigned short  tcp_checksum            (unsigned char *, packet_t*, unsigned short);
unsigned short  tcp_checksum            (unsigned char *, packet_t*, unsigned short);
unsigned int    tcp_header              (char *, socket_t*, int, int);
unsigned int    tcp_header              (char *, socket_t*, int, int);
void            tcp_reply               (socket_t*, char*, int);
void            tcp_reply               (socket_t*, char*, int);
void            tcp_open                (socket_t*);
void            tcp_open                (socket_t*);
void            tcp_retransmit          (socket_t*);
void            tcp_retransmit          (socket_t*);
Line 62... Line 105...
void            tcp_response            (char*, socket_t*);
void            tcp_response            (char*, socket_t*);
void            tcp_disconnect          (socket_t*);
void            tcp_disconnect          (socket_t*);
void            tcp_tx                  (socket_t*, char*, int);
void            tcp_tx                  (socket_t*, char*, int);
void            parse_tcp_options       (char*, packet_t*);
void            parse_tcp_options       (char*, packet_t*);
void            parse_tcp_packet        (char*, packet_t*);
void            parse_tcp_packet        (char*, packet_t*);
 
void            process_tcp             (socket_t*);
extern int      tcp_checksum_errors_g;
 
 
 
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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