YRemoveHost(3)

YRemoveHost3

Y host access list removing

Usage

#include <Y2/Y.h>
#include <Y2/Ylib.h>

int YRemoveHost(

YConnection *connection,

YIPUnion *ip
)

Arguments

connection

Specifies the connection to the Y server, obtained by a call to YOpenConnection.

ip

Specifies the ip address of the host machine. See YIPUnion for more information about this structure.

Overview

The YRemoveHost function removes the specified IP address ip from the Y server's list of allowed hosts. If the IP address ip never existed in the Y server's list of allowed hosts then no operation will be performed.

Return value

The YRemoveHost function returns 0 on success or -1 on failure. It will return success even if the specified address was never in the Y server's list.

Examples

#include <stdio.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>

int main(int argc, char *argv[])
{

YIPUnion ip;

YConnection *con = YOpenConnection(

"/usr/sbin/starty",

"127.0.0.1:9433"

);

if(con == NULL)

return(1);

/* 207.200.89.225 */

ip.charaddr[0] = 207;

ip.charaddr[1] = 200;

ip.charaddr[2] = 89;

ip.charaddr[3] = 225;

if(YRemoveHost(con, &ip))

printf("Error.\n");

else

printf("Success!\n");

YCloseConnection(con, False);

return(0);
}

Releases

5 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0
  2. 3.1–6.0

From liby-dev 2.14.5-7 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.