~ubuntu-branches/debian/squeeze/lftp/squeeze

« back to all changes in this revision

Viewing changes to src/network.cc

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2010-04-09 23:45:53 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409234553-7ay83rk2aas3r7g3
Tags: 4.0.6-1
* new upstream release from 2010-03-25
  - fixes proftp problem. closes: Bug#570861
* switched to to dpkg-source 3.0 (quilt)
* pget help and lftp -h mentions -c since some time
  closes: Bug#377043
* lftp -c exists.:) closes: Bug#401572

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
19
 */
20
20
 
21
 
/* $Id: network.cc,v 1.6 2009/09/15 07:56:30 lav Exp $ */
 
21
/* $Id: network.cc,v 1.7 2010/02/05 14:34:48 lav Exp $ */
22
22
 
23
23
#include <config.h>
24
24
#include <stdio.h>
48
48
#include "network.h"
49
49
#include "ResMgr.h"
50
50
#include "ProtoLog.h"
 
51
#include "xstring.h"
51
52
 
52
53
sockaddr_u::sockaddr_u()
53
54
{
81
82
   return 0;
82
83
}
83
84
 
84
 
bool sockaddr_u::is_reserved()
 
85
const xstring& sockaddr_u::to_string() const
 
86
{
 
87
   return xstring::format("[%s]:%d",address(),port());
 
88
}
 
89
 
 
90
bool sockaddr_u::is_reserved() const
85
91
{
86
92
   if(sa.sa_family==AF_INET)
87
93
   {
93
99
   return false;
94
100
}
95
101
 
96
 
bool sockaddr_u::is_multicast()
 
102
bool sockaddr_u::is_multicast() const
97
103
{
98
104
   if(sa.sa_family==AF_INET)
99
105
   {
103
109
   return false;
104
110
}
105
111
 
106
 
bool sockaddr_u::is_private()
 
112
bool sockaddr_u::is_private() const
107
113
{
108
114
   if(sa.sa_family==AF_INET)
109
115
   {
114
120
   }
115
121
   return false;
116
122
}
117
 
bool sockaddr_u::is_loopback()
 
123
bool sockaddr_u::is_loopback() const
118
124
{
119
125
   if(sa.sa_family==AF_INET)
120
126
   {