Main Page | Class List | File List | Class Members

CServices Class Reference

#include <services.h>

List of all members.

Static Public Member Functions

static std::string LookupByPort (int port, const char *proto="tcp")
static int LookupByName (const char *name, const char *proto="tcp")


Detailed Description

This is a simple wrapper around the services file /etc/services upon Unix hosts.

Version:
Id
services.h,v 1.2 2005/10/08 14:43:23 steve Exp
Author:
Steve Kemp http://www.steve.org.uk/


Member Function Documentation

int CServices::LookupByName const char *  name,
const char *  proto = "tcp"
[static]
 

Lookup and return the primary port used for a given service

Parameters:
name The service to find the port for.
proto The protocol to use.
Returns:
The port used by the given service

std::string CServices::LookupByPort int  port,
const char *  proto = "tcp"
[static]
 

Lookup and return the primary name used for a given port.

Parameters:
port The port to find the name(s) for.
proto The protocol to use.
Returns:
The primary service name.


The documentation for this class was generated from the following files:
Generated on Tue Oct 25 23:04:38 2005 for fortress by  doxygen 1.4.2