xref: /freebsd/usr.sbin/nscd/singletons.h (revision db1bdf2b02d3b5be010b50efb461938b83f741df)
106a99fe3SHajimu UMEMOTO /*-
206a99fe3SHajimu UMEMOTO  * Copyright (c) 2005 Michael Bushkov <bushman@rsu.ru>
306a99fe3SHajimu UMEMOTO  * All rights reserved.
406a99fe3SHajimu UMEMOTO  *
506a99fe3SHajimu UMEMOTO  * Redistribution and use in source and binary forms, with or without
606a99fe3SHajimu UMEMOTO  * modification, are permitted provided that the following conditions
706a99fe3SHajimu UMEMOTO  * are met:
806a99fe3SHajimu UMEMOTO  * 1. Redistributions of source code must retain the above copyright
906a99fe3SHajimu UMEMOTO  *    notice, this list of conditions and the following disclaimer.
1006a99fe3SHajimu UMEMOTO  * 2. Redistributions in binary form must reproduce the above copyright
1106a99fe3SHajimu UMEMOTO  *    notice, this list of conditions and the following disclaimer in the
1206a99fe3SHajimu UMEMOTO  *    documentation and/or other materials provided with the distribution.
1306a99fe3SHajimu UMEMOTO  *
1406a99fe3SHajimu UMEMOTO  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1506a99fe3SHajimu UMEMOTO  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1606a99fe3SHajimu UMEMOTO  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1706a99fe3SHajimu UMEMOTO  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1806a99fe3SHajimu UMEMOTO  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1906a99fe3SHajimu UMEMOTO  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2006a99fe3SHajimu UMEMOTO  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2106a99fe3SHajimu UMEMOTO  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2206a99fe3SHajimu UMEMOTO  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2306a99fe3SHajimu UMEMOTO  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2406a99fe3SHajimu UMEMOTO  * SUCH DAMAGE.
2506a99fe3SHajimu UMEMOTO  *
2606a99fe3SHajimu UMEMOTO  * $FreeBSD$
2706a99fe3SHajimu UMEMOTO  */
2806a99fe3SHajimu UMEMOTO 
29db1bdf2bSMichael Bushkov #ifndef __NSCD_SINGLETONS_H__
30db1bdf2bSMichael Bushkov #define __NSCD_SINGLETONS_H__
3106a99fe3SHajimu UMEMOTO 
3206a99fe3SHajimu UMEMOTO #include "cachelib.h"
3306a99fe3SHajimu UMEMOTO #include "config.h"
3406a99fe3SHajimu UMEMOTO #include "agent.h"
3506a99fe3SHajimu UMEMOTO 
3606a99fe3SHajimu UMEMOTO struct runtime_env {
3706a99fe3SHajimu UMEMOTO 	int	queue;
3806a99fe3SHajimu UMEMOTO 	int	sockfd;
3906a99fe3SHajimu UMEMOTO 	int	finished;	/* for future use */
4006a99fe3SHajimu UMEMOTO };
4106a99fe3SHajimu UMEMOTO 
4206a99fe3SHajimu UMEMOTO extern struct configuration *s_configuration;
4306a99fe3SHajimu UMEMOTO extern cache s_cache;
4406a99fe3SHajimu UMEMOTO extern struct runtime_env *s_runtime_env;
4506a99fe3SHajimu UMEMOTO extern struct agent_table *s_agent_table;
4606a99fe3SHajimu UMEMOTO 
4706a99fe3SHajimu UMEMOTO #endif
48