/[gxemul]/trunk/src/include/net.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/include/net.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: net.h,v 1.11 2005/03/14 19:14:03 debug Exp $   *  $Id: net.h,v 1.12 2005/06/17 21:00:04 debug Exp $
32   *   *
33   *  Emulated network support.  (See net.c for more info.)   *  Emulated network support.  (See net.c for more info.)
34   */   */
# Line 39  Line 39 
39    
40  struct emul;  struct emul;
41  struct ethernet_packet_link;  struct ethernet_packet_link;
42    struct remote_net;
43    
44    
45  /*****************************************************************************/  /*****************************************************************************/
# Line 128  struct net { Line 129  struct net {
129    
130          struct udp_connection udp_connections[MAX_UDP_CONNECTIONS];          struct udp_connection udp_connections[MAX_UDP_CONNECTIONS];
131          struct tcp_connection tcp_connections[MAX_TCP_CONNECTIONS];          struct tcp_connection tcp_connections[MAX_TCP_CONNECTIONS];
132    
133            /*  Distributed network:  */
134            int             local_port;
135            int             local_port_socket;
136            struct remote_net *remote_nets;
137  };  };
138    
139  /*  net.c:  */  /*  net.c:  */
# Line 140  void net_ethernet_tx(struct net *net, vo Line 146  void net_ethernet_tx(struct net *net, vo
146  void net_dumpinfo(struct net *net);  void net_dumpinfo(struct net *net);
147  void net_add_nic(struct net *net, void *extra, unsigned char *macaddr);  void net_add_nic(struct net *net, void *extra, unsigned char *macaddr);
148  struct net *net_init(struct emul *emul, int init_flags,  struct net *net_init(struct emul *emul, int init_flags,
149          char *ipv4addr, int netipv4len);          char *ipv4addr, int netipv4len, char **remote, int n_remote,
150            int local_port);
151    
152  /*  Flag used to signify that this net should have a gateway:  */  /*  Flag used to signify that this net should have a gateway:  */
153  #define NET_INIT_FLAG_GATEWAY           1  #define NET_INIT_FLAG_GATEWAY           1
# Line 149  struct net *net_init(struct emul *emul, Line 156  struct net *net_init(struct emul *emul,
156  /*  /*
157   *  This is for internal use in src/net.c:   *  This is for internal use in src/net.c:
158   */   */
   
159  struct ethernet_packet_link {  struct ethernet_packet_link {
160          struct ethernet_packet_link *prev;          struct ethernet_packet_link *prev;
161          struct ethernet_packet_link *next;          struct ethernet_packet_link *next;
# Line 159  struct ethernet_packet_link { Line 165  struct ethernet_packet_link {
165          int             len;          int             len;
166  };  };
167    
168    struct remote_net {
169            struct remote_net *next;
170    
171            char            *name;
172            struct in_addr  ipv4_addr;
173            int             portnr;
174    };
175    
176  #define TCP_OUTSIDE_TRYINGTOCONNECT     1  #define TCP_OUTSIDE_TRYINGTOCONNECT     1
177  #define TCP_OUTSIDE_CONNECTED           2  #define TCP_OUTSIDE_CONNECTED           2
# Line 167  struct ethernet_packet_link { Line 180  struct ethernet_packet_link {
180    
181  #define TCP_INCOMING_BUF_LEN    2000  #define TCP_INCOMING_BUF_LEN    2000
182    
   
183  #endif  /*  NET_H  */  #endif  /*  NET_H  */

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26