home *** CD-ROM | disk | FTP | other *** search
- /*
- c_proto.h
- */
- /* Copyright (c) 1994 Christian F. Tschudin. All rights reserved.
-
- Distributed under the terms of the GNU General Public License
- version 2 of june 1991 as published by the Free Software
- Foundation, Inc.
-
- This file is part of M0.
-
- M0 is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY. No author or distributor accepts responsibility to anyone for
- the consequences of using it or for whether it serves any particular
- purpose or works at all, unless he says so in writing. Refer to the GNU
- General Public License for full details.
-
- Everyone is granted permission to copy, modify and redistribute M0, but
- only under the conditions described in the GNU General Public License.
- A copy of this license is supposed to have been given to you along with
- M0 so you can know your rights and responsibilities. It should be in a
- file named LICENSE. Among other things, the copyright notice and this
- notice must be preserved on all copies. */
-
- #ifndef C_PROTO_H
- #define C_PROTO_H
-
- #include "l_proto.h"
-
-
- #ifdef CHANNEL_CONSOLE /* c_con.c */
- extern int msgr_was_empty;
- extern eindex console_addr;
- extern eindex console_name;
- extern int console_init(byteptr keyboard_queue, byteptr keyboard_vect);
- extern eindex add_console_channel();
- #endif
-
-
- #ifdef CHANNEL_FILE /* c_file.c */
- extern eindex file_addr;
- extern int file_init();
- extern eindex add_file_channel(uint i);
- #endif
-
-
- #ifdef CHANNEL_NIT /* c_nit.c */
- typedef byte eth[6];
- extern eindex nit_addr; /* array with the local ethernet addresses */
- extern eindex nit_name;
- extern char** get_eth_devices();
- extern int nit_init(char **devs, int proto); /* names of devices to open */
- extern void nit_recv(int fd, eindex *msgr, eindex *src);
- extern int nit_send(sint chan, byteptr dest, byteptr packet, uint len);
- #define ETHERNET_TYPE (0x0ffff &(('M'<<8) | '0')) /* 0x4d30 */
- extern eindex add_nit_channel(sint chan_no, byteptr dest);
- #endif
-
-
- #ifdef CHANNEL_UDP /* c_udp.c */
- extern int udp_listen(uint host, int port);
- extern eindex udp_addr; /* array with the local udp addresses */
- extern eindex udp_name;
- extern uint* get_ip_addresses();
- extern int udp_init(uint *ip, int port);
- extern void udp_recv(int s, eindex *msgr, eindex *src);
- extern int udp_send(int s, uint host, int port,
- byteptr packet, int len);
- extern char* iptoa(uint host); /* unsigned int to a.b.c.d format */
- #define UDP_SERVERPORT (0x0ffff &(('M'<<8) | '0')) /* 0x4d30 */
- extern eindex add_udp_channel(sint chan, uint desthost, ushort port);
- #endif /* CHANNEL_UDP */
-
-
- #endif
-