xref: /netbsd-src/usr.sbin/altq/altqstat/quip_client.h (revision d5e1f166e05743490379ca13acbe062035038184)
1*d5e1f166Sitojun /*	$NetBSD: quip_client.h,v 1.4 2001/08/22 08:52:36 itojun Exp $	*/
2*d5e1f166Sitojun /*	$KAME: quip_client.h,v 1.4 2001/08/16 07:43:15 itojun Exp $	*/
38726857eSthorpej /*
48726857eSthorpej  * Copyright (C) 1999-2000
58726857eSthorpej  *	Sony Computer Science Laboratories, Inc.  All rights reserved.
68726857eSthorpej  *
78726857eSthorpej  * Redistribution and use in source and binary forms, with or without
88726857eSthorpej  * modification, are permitted provided that the following conditions
98726857eSthorpej  * are met:
108726857eSthorpej  * 1. Redistributions of source code must retain the above copyright
118726857eSthorpej  *    notice, this list of conditions and the following disclaimer.
128726857eSthorpej  * 2. Redistributions in binary form must reproduce the above copyright
138726857eSthorpej  *    notice, this list of conditions and the following disclaimer in the
148726857eSthorpej  *    documentation and/or other materials provided with the distribution.
158726857eSthorpej  *
168726857eSthorpej  * THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
178726857eSthorpej  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188726857eSthorpej  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198726857eSthorpej  * ARE DISCLAIMED.  IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
208726857eSthorpej  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218726857eSthorpej  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228726857eSthorpej  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238726857eSthorpej  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248726857eSthorpej  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258726857eSthorpej  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268726857eSthorpej  * SUCH DAMAGE.
278726857eSthorpej  */
288726857eSthorpej 
298726857eSthorpej #ifndef _QUIP_CLIENT_H_
308726857eSthorpej #define _QUIP_CLIENT_H_
318726857eSthorpej 
328726857eSthorpej /* unix domain socket for quip */
338726857eSthorpej #define QUIP_PATH	"/var/run/altq_quip"
348726857eSthorpej 
358b8734d2Sitojun #define	REQ_MAXSIZE	256	/* max request size */
368b8734d2Sitojun #define	RES_MAXSIZE	256	/* max reply header size */
378b8734d2Sitojun #define	BODY_MAXSIZE	8192	/* max reply body size */
388b8734d2Sitojun #define	QUIPMSG_MAXSIZE	(RES_MAXSIZE+BODY_MAXSIZE)	/* max message size */
398b8734d2Sitojun 
408726857eSthorpej extern int quip_echo;
418726857eSthorpej 
428726857eSthorpej int quip_openserver(void);
438726857eSthorpej int quip_closeserver(void);
448b8734d2Sitojun void quip_sendrequest(FILE *, const char *);
458b8734d2Sitojun int quip_recvresponse(FILE *, char *, char *, int *);
468726857eSthorpej void quip_rawmode(void);
478b8734d2Sitojun char *quip_selectinterface(char *);
488b8734d2Sitojun char *quip_selectqdisc(char *, char *);
498b8734d2Sitojun void quip_chandle2name(const char *, u_long, char *, size_t);
508b8734d2Sitojun void quip_printqdisc(const char *);
518b8734d2Sitojun void quip_printfilter(const char *, const u_long);
528726857eSthorpej void quip_printconfig(void);
538726857eSthorpej 
548726857eSthorpej #endif /* _QUIP_CLIENT_H_ */
55