annotate src/g23m-fad/tcpip/rnet/rnet_message.h @ 662:8cd8fd15a095

SIM speed enhancement re-enabled and made configurable TI's original code supported SIM speed enhancement, but Openmoko had it disabled, and OM's disabling of speed enhancement somehow caused certain SIM cards to start working which didn't work before (OM's bug #666). Because our FC community is much smaller in year 2020 than OM's community was in their day, we are not able to find one of those #666-affected SIMs, thus the real issue they had encountered remains elusive. Thus our solution is to re-enable SIM speed enhancement and simply wait for if and when someone runs into a #666-affected SIM once again. We provide a SIM_allow_speed_enhancement global variable that allows SIM speed enhancement to be enabled or disabled per session, and an /etc/SIM_spenh file in FFS that allows it to enabled or disabled on a non-volatile basis. SIM speed enhancement is now enabled by default.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 24 May 2020 05:02:28 +0000
parents 90eb61ecd093
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
174
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * @file rnet_message.h
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * Riviera NET.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * Messages that RNET can SEND.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 * @author Vincent Oberle (v-oberle@ti.com)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 * @version 0.1
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 /*
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 * History:
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 * Date Author Modification
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 * --------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 * 01/25/2002 Vincent Oberle Create
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 * (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #ifndef __RNET_MESSAGE_H_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #define __RNET_MESSAGE_H_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #include "rv_general.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #include "rvm_use_id_list.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "rnet_api.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "rnet_cfg.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "rnet_ip_addr.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #ifdef __cplusplus
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 extern "C"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 * The message offset must differ for each SWE in order to have
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 * unique msg_id in the system.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #define RNET_MESSAGE_OFFSET BUILD_MESSAGE_OFFSET(RNET_USE_ID)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 * @name RNET_ERROR_IND
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 * Sent by RNET when an error occured in a connection.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 * The following list indicates the values that the error code
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 * can take as well as their meaning depending on the processing
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 * Connecting:
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 * - RNET_MEMORY_ERR No buffer space is available. The socket cannot be connected.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 * - RNET_NET_UNREACHABLE The network cannot be reached from this host at this time.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 * - RNET_TIMEOUT Attempt to connect timed out without establishing a connection
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 * - RNET_CONN_REFUSED The attempt to connect was forcefully rejected.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 * - RNET_NOT_SUPPORTED Addresses in the specified family cannot be used with this socket.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 * Closing:
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 * - RNET_INTERNAL_ERR The network subsystem has failed.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 * - RNET_CONN_RESET The connection was reset by the remote side
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 * - RNET_CONN_ABORTED The connection was terminated due to a time-out or other failure.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 * - RNET_CONN_CLOSED The connection was gracefully closed (not an error actually)..
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 * @param desc Connection identifier.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 * @param error Error code.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 /*@{*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 /** Message ID. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #define RNET_ERROR_IND (RNET_MESSAGE_OFFSET | 0x001)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 /** Message structure. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 typedef struct
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 T_RV_HDR hdr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 T_RNET_DESC * desc;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 T_RNET_RET error;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 } T_RNET_ERROR_IND;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 /*@}*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 * @name RNET_CONNECT_IND
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 * Sent to the connection oriented server when a client requests a connection.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 * The server gets in this message a new connection identifier that
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 * the one the server was listening with.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 * The client address and port are also indicated.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 * @param new_desc New connection identifier.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 * @param listen_desc Indicates the descriptor of the connection that server
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 * is using for listening.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 * @param peer_addr Peer address.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 * @param peer_port Peer port.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 /*@{*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 /** Message ID. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 #define RNET_CONNECT_IND (RNET_MESSAGE_OFFSET | 0x002)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 /** Message structure. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 typedef struct
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 T_RV_HDR hdr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 T_RNET_DESC * new_desc;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 T_RNET_DESC * listen_desc;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 T_RNET_IP_ADDR peer_addr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 T_RNET_PORT peer_port;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 } T_RNET_CONNECT_IND;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 /*@}*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 * @name RNET_CONNECT_CFM
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 * Indicates that a connection request was successfully completed.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 * @param desc Connection identifier.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 /*@{*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 /** Message ID. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 #define RNET_CONNECT_CFM (RNET_MESSAGE_OFFSET | 0x003)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 /** Message structure. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 typedef struct
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 T_RV_HDR hdr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 T_RNET_DESC * desc;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 } T_RNET_CONNECT_CFM;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 /*@}*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 * @name RNET_SEND_RDY
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 * Indicates that the connection descriptor is ready for sending data.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 * A first RNET_SEND_RDY message is sent when a connection ID is first
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 * connected (function rnet_connect) or accepted (message RNET_CONNECT_IND)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 * and then when a call to the function rnet_send couldn't send all
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 * wanted data. The application should then try to send the data again
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 * when receiving RNET_SEND_RDY.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 * @param desc Connection identifier.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 /*@{*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 /** Message ID. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 #define RNET_SEND_RDY (RNET_MESSAGE_OFFSET | 0x004)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 /** Message structure. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 typedef struct
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 T_RV_HDR hdr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 T_RNET_DESC * desc;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 } T_RNET_SEND_RDY;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 /*@}*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 * @name RNET_RECV_IND
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 * New data arrived on the connection.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 * See the description of the related function rnet_recv.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 * @param desc Connection identifier.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 * @param peer_addr Peer address.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 * @param peer_port Peer port.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 /*@{*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 /** Message ID. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 #define RNET_RECV_IND (RNET_MESSAGE_OFFSET | 0x005)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 /** Message structure. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 typedef struct
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 T_RV_HDR hdr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 T_RNET_DESC * desc;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 T_RNET_IP_ADDR peer_addr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 T_RNET_PORT peer_port;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 } T_RNET_RECV_IND;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 /*@}*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 /**
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 * @name RNET_HOST_INFO
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 * Information on a host, names and addresses.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 * If error is RNET_OK, no error occured and the host_name, host_addr
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 * and user_data parameters are valid.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 * If is different from RNET_OK, the host information could not be retrieved
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 * and only user_data is valid.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 *
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 * @param error Indicates if the host information could be
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 * retrieved or not.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 * @param host_name Official name of host.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 * @param host_addr One address for the host.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 * @param user_data Application specific pointer set by the user
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 * in rnet_get_host_info.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 /*@{*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 /** Message ID. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 #define RNET_HOST_INFO (RNET_MESSAGE_OFFSET | 0x006)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 /** Message structure. */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 typedef struct
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 T_RV_HDR hdr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 T_RNET_RET error;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 T_RNET_IP_ADDR host_addr;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 char host_name[RNET_MAX_HOST_NAME_LEN];
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 void * user_data;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 } T_RNET_HOST_INFO;
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 /*@}*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 #ifdef __cplusplus
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 }
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 #endif /* __RNET_MESSAGE_H_ */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228