hast.h (218048) | hast.h (218218) |
---|---|
1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sbin/hastd/hast.h 218048 2011-01-28 22:33:47Z pjd $ | 29 * $FreeBSD: head/sbin/hastd/hast.h 218218 2011-02-03 11:39:49Z pjd $ |
30 */ 31 32#ifndef _HAST_H_ 33#define _HAST_H_ 34 35#include <sys/queue.h> 36#include <sys/socket.h> 37 --- 139 unchanged lines hidden (view full) --- 177 uint8_t hr_syncsrc; 178 179 /* Resource role: HAST_ROLE_{INIT,PRIMARY,SECONDARY}. */ 180 int hr_role; 181 /* Previous resource role: HAST_ROLE_{INIT,PRIMARY,SECONDARY}. */ 182 int hr_previous_role; 183 /* PID of child worker process. 0 - no child. */ 184 pid_t hr_workerpid; | 30 */ 31 32#ifndef _HAST_H_ 33#define _HAST_H_ 34 35#include <sys/queue.h> 36#include <sys/socket.h> 37 --- 139 unchanged lines hidden (view full) --- 177 uint8_t hr_syncsrc; 178 179 /* Resource role: HAST_ROLE_{INIT,PRIMARY,SECONDARY}. */ 180 int hr_role; 181 /* Previous resource role: HAST_ROLE_{INIT,PRIMARY,SECONDARY}. */ 182 int hr_previous_role; 183 /* PID of child worker process. 0 - no child. */ 184 pid_t hr_workerpid; |
185 /* Control connection between parent and child. */ | 185 /* Control commands from parent to child. */ |
186 struct proto_conn *hr_ctrl; 187 /* Events from child to parent. */ 188 struct proto_conn *hr_event; | 186 struct proto_conn *hr_ctrl; 187 /* Events from child to parent. */ 188 struct proto_conn *hr_event; |
189 /* Connection requests from child to parent. */ 190 struct proto_conn *hr_conn; |
|
189 190 /* Activemap structure. */ 191 struct activemap *hr_amp; 192 /* Locked used to synchronize access to hr_amp. */ 193 pthread_mutex_t hr_amp_lock; 194 195 /* Next resource. */ 196 TAILQ_ENTRY(hast_resource) hr_next; 197}; 198 199struct hastd_config *yy_config_parse(const char *config, bool exitonerror); 200void yy_config_free(struct hastd_config *config); 201 202void yyerror(const char *); 203int yylex(void); 204int yyparse(void); 205 206#endif /* !_HAST_H_ */ | 191 192 /* Activemap structure. */ 193 struct activemap *hr_amp; 194 /* Locked used to synchronize access to hr_amp. */ 195 pthread_mutex_t hr_amp_lock; 196 197 /* Next resource. */ 198 TAILQ_ENTRY(hast_resource) hr_next; 199}; 200 201struct hastd_config *yy_config_parse(const char *config, bool exitonerror); 202void yy_config_free(struct hastd_config *config); 203 204void yyerror(const char *); 205int yylex(void); 206int yyparse(void); 207 208#endif /* !_HAST_H_ */ |