ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/vendor/pxys2-2.0.0/libopas/opas/opas_msg.h
Revision: 3252
Committed: Wed Apr 2 20:41:43 2014 UTC (11 years, 4 months ago) by michael
Content type: text/x-chdr
File size: 2161 byte(s)
Log Message:
- Imported pxys2-2.0.0

File Contents

# User Rev Content
1 michael 3252 /* Copyright (C) 2003 Stephane Thiell
2     *
3     * This file is part of libopas (from pxys)
4     *
5     * This program is free software; you can redistribute it and/or
6     * modify it under the terms of the GNU General Public License
7     * as published by the Free Software Foundation; either version 2
8     * of the License, or (at your option) any later version.
9     *
10     * This program is distributed in the hope that it will be useful,
11     * but WITHOUT ANY WARRANTY; without even the implied warranty of
12     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13     * GNU General Public License for more details.
14     *
15     * You should have received a copy of the GNU General Public License
16     * along with this program; if not, write to the Free Software
17     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18     *
19     * $Id: opas_msg.h,v 1.1.1.1 2003/12/30 17:27:47 mbuna Exp $
20     */
21     #ifndef INCLUDED_OPAS_OPAS_MSG_H
22     #define INCLUDED_OPAS_OPAS_MSG_H
23    
24     #include <opas/opas_stdint.h>
25    
26     #include <sys/types.h>
27     #include <sys/socket.h>
28     #include <sys/time.h>
29     #include <netinet/in.h>
30    
31    
32     /* fixed-length OPAS messages structs
33     */
34     struct opas_msg_query
35     {
36     uint32_t head;
37     uint32_t user_data;
38     struct in_addr addr;
39     };
40    
41     struct opas_msg_query6
42     {
43     uint32_t head;
44     uint32_t user_data;
45     struct in6_addr addr;
46     };
47    
48     struct opas_msg_reply_error
49     {
50     uint32_t head;
51     uint32_t user_data;
52     struct in_addr addr;
53     uint32_t error;
54     };
55    
56     struct opas_msg_reply6_error
57     {
58     uint32_t head;
59     uint32_t user_data;
60     struct in6_addr addr;
61     uint32_t error;
62     };
63    
64    
65    
66     struct opas_msg_reply_proxy
67     {
68     uint32_t head;
69     uint32_t user_data;
70     struct in_addr addr;
71     uint32_t timestamp;
72     uint16_t proxy_type;
73     uint16_t proxy_port;
74     char proxy_descr[1];
75     };
76    
77     struct opas_msg_reply6_proxy
78     {
79     uint32_t head;
80     uint32_t user_data;
81     struct in6_addr addr;
82     uint32_t timestamp;
83     uint16_t proxy_type;
84     uint16_t proxy_port;
85     char proxy_descr[1];
86     };
87    
88     struct opas_msg_user_header
89     {
90     uint32_t head;
91     uint32_t user_data;
92     uint32_t data_length;
93     };
94    
95     #define OPAS_MSG_MINSIZE (12)
96     #define OPAS_MSG_MAXSIZE (4 + 255)
97     #define OPAS_UMSG_MAXSIZE (65536)
98    
99     #endif /* INCLUDED_OPAS_OPAS_MSG_H */