1/* 2 * $Id: rend-unix.h,v 1.1 2009-06-30 02:31:09 steven Exp $ 3 * General unix rendezvous routines 4 * 5 * Copyright (C) 2003 Ron Pedde (ron@pedde.com) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21 22#ifndef _REND_UNIX_H_ 23#define _REND_UNIX_H_ 24 25#define MAX_NAME_LEN 256 26 27typedef struct tag_rend_message { 28 int cmd; 29 int port; 30 char name[MAX_NAME_LEN]; 31 char type[MAX_NAME_LEN]; 32} REND_MESSAGE; 33 34#define REND_MSG_TYPE_REGISTER 0 35#define REND_MSG_TYPE_UNREGISTER 1 36#define REND_MSG_TYPE_STOP 2 37#define REND_MSG_TYPE_STATUS 3 38 39#define RD_SIDE 0 40#define WR_SIDE 1 41 42extern int rend_pipe_to[2]; 43extern int rend_pipe_from[2]; 44 45extern int rend_send_message(REND_MESSAGE *pmsg); 46extern int rend_send_response(int value); 47extern int rend_private_init(char *user); 48extern int rend_read_message(REND_MESSAGE *pmsg); 49 50#endif /* _REND_UNIX_H_ */ 51 52