--- Gnu-Mach/device/net_io.h 2020/09/02 04:36:57 1.1.1.1 +++ Gnu-Mach/device/net_io.h 2020/09/02 04:45:29 1.1.1.3 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -42,6 +42,8 @@ #include #include +#include +#include #include /* @@ -56,17 +58,19 @@ * functions. net_kmsg_get may return IKM_NULL. */ -extern ipc_kmsg_t net_kmsg_get(); -extern void net_kmsg_put(); +extern ipc_kmsg_t net_kmsg_get(void); +extern void net_kmsg_put(ipc_kmsg_t); /* * Network utility routines. */ -extern void net_packet(); -extern void net_filter(); -extern io_return_t net_getstat(); -extern io_return_t net_write(); +extern void net_ast(); +extern void net_packet(struct ifnet *, ipc_kmsg_t, unsigned int, boolean_t); +extern void net_filter(ipc_kmsg_t, ipc_kmsg_queue_t); +extern io_return_t net_getstat(struct ifnet *, dev_flavor_t, dev_status_t, + natural_t *); +extern io_return_t net_write(struct ifnet *, int (*)(), io_req_t); /* * Non-interrupt code may allocate and free net_kmsgs with these functions. @@ -74,7 +78,14 @@ extern io_return_t net_write(); extern vm_size_t net_kmsg_size; +extern void net_kmsg_collect (void); + #define net_kmsg_alloc() ((ipc_kmsg_t) kalloc(net_kmsg_size)) #define net_kmsg_free(kmsg) kfree((vm_offset_t) (kmsg), net_kmsg_size) -#endif _DEVICE_NET_IO_H_ +extern unsigned int ntohl(unsigned int); +extern unsigned short int ntohs(unsigned short int); +extern unsigned int htonl(unsigned int); +extern unsigned short int htons(unsigned short int); + +#endif /* _DEVICE_NET_IO_H_ */