ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/sockinfo.h
(Generate patch)

Comparing gvpe/src/sockinfo.h (file contents):
Revision 1.5 by pcg, Sat Apr 5 17:54:22 2003 UTC vs.
Revision 1.8 by pcg, Thu Oct 16 02:41:21 2003 UTC

1/* 1/*
2 sockinfo.h -- socket address management 2 sockinfo.h -- socket address management
3
4 Copyright (C) 2003 Marc Lehmann <pcg@goof.com> 3 Copyright (C) 2003 Marc Lehmann <pcg@goof.com>
5 4
6 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
19*/ 18*/
20 19
21#ifndef VPE_SOCKINFO_H__ 20#ifndef VPE_SOCKINFO_H__
22#define VPE_SOCKINFO_H__ 21#define VPE_SOCKINFO_H__
23 22
24#include <sys/socket.h> 23#include "netcompat.h"
25#include <netinet/in.h>
26 24
27#include "conf.h" 25#include "conf.h"
28 26
29// encapsulate one or more network addresses. this structure 27// encapsulate one or more network addresses. this structure
30// gets transferred over the wire, so be careful with endianness etc. 28// gets transferred over the wire, so be careful with endianness etc.
35 u8 prot; 33 u8 prot;
36 u8 pad1; 34 u8 pad1;
37 35
38 void set (const sockaddr_in *sa, u8 prot_); 36 void set (const sockaddr_in *sa, u8 prot_);
39 void set (const conf_node *conf, u8 prot_); 37 void set (const conf_node *conf, u8 prot_);
38 void set (const char *hostname, u16 port_, u8 prot_);
40 39
41 // return the supported protocols 40 // return the supported protocols
42 u8 supported_protocols (conf_node *conf = 0); 41 u8 supported_protocols (conf_node *conf = 0);
43 bool upgrade_protocol (u8 prot_, conf_node *conf = 0); 42 bool upgrade_protocol (u8 prot_, conf_node *conf = 0);
44 43

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines