3 * Private declarations of the Moira library.
5 * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
13 #include <sys/types.h>
15 #include <netinet/in.h>
16 #include <arpa/inet.h>
18 extern int _mr_conn, mr_inited;
20 typedef struct mr_params {
22 u_long mr_procno; /* for call */
23 u_long mr_status; /* for reply */
28 unsigned char *mr_flattened;
31 #define CHECK_CONNECTED if (!_mr_conn) return MR_NOT_CONNECTED
33 #define getlong(cp, l) l = ((((unsigned char *)cp)[0] * 256 + ((unsigned char *)cp)[1]) * 256 + ((unsigned char *)cp)[2]) * 256 + ((unsigned char *)cp)[3]
34 #define putlong(cp, l) do { ((unsigned char *)cp)[0] = l >> 24; ((unsigned char *)cp)[1] = l >> 16; ((unsigned char *)cp)[2] = l >> 8; ((unsigned char *)cp)[3] = l; } while(0);
36 /* prototypes from mr_call.h */
37 int mr_do_call(struct mr_params *params, struct mr_params *reply);
38 int mr_send(int fd, struct mr_params *params);
39 int mr_receive(int fd, struct mr_params *params);
40 void mr_destroy_reply(mr_params reply);
42 /* prototypes from mr_connect.h */
43 int mr_accept(int s, struct sockaddr_in *sin);
44 int mr_connect_internal(char *server, char *port);
45 int mr_listen(char *port);
47 /* prototypes from mr_init.c */