]> andersk Git - moira.git/blame - lib/mr_private.h
off-by-one error in dequoting quoted hostnames
[moira.git] / lib / mr_private.h
CommitLineData
fa59b86f 1/* $Id$
e2a67c78 2 *
7ac48069 3 * Private declarations of the Moira library.
e2a67c78 4 *
7ac48069 5 * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology
6 * For copying and distribution information, please see the file
7 * <mit-copyright.h>.
e2a67c78 8 */
9
85330553 10#include <mit-copyright.h>
11#include <moira.h>
55ed894e 12
85330553 13#include <sys/types.h>
55ed894e 14
85330553 15#include <netinet/in.h>
16#include <arpa/inet.h>
55ed894e 17
85330553 18extern int _mr_conn, mr_inited;
55ed894e 19
85330553 20typedef struct mr_params {
21 union {
22 u_long mr_procno; /* for call */
23 u_long mr_status; /* for reply */
24 } u;
25 int mr_argc;
26 char **mr_argv;
27 int *mr_argl;
28 unsigned char *mr_flattened;
29} mr_params;
55ed894e 30
85330553 31#define CHECK_CONNECTED if (!_mr_conn) return MR_NOT_CONNECTED
5eaef520 32
85330553 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);
7ac48069 35
36/* prototypes from mr_call.h */
85330553 37int mr_do_call(struct mr_params *params, struct mr_params *reply);
38int mr_send(int fd, struct mr_params *params);
39int mr_receive(int fd, struct mr_params *params);
40void mr_destroy_reply(mr_params reply);
41
42/* prototypes from mr_connect.h */
43int mr_accept(int s, struct sockaddr_in *sin);
44int mr_connect_internal(char *server, char *port);
45int mr_listen(char *port);
7ac48069 46
47/* prototypes from mr_init.c */
48void mr_init(void);
This page took 0.096133 seconds and 5 git commands to generate.