File: vnc-connect.c

package info (click to toggle)
cheops 0.61-15.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,272 kB
  • ctags: 1,312
  • sloc: ansic: 12,731; sh: 155; makefile: 151
file content (42 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Cheops Network User Interface
 *
 * Copyright (C) 1999, Adtran, Inc.
 * 
 * Distributed under the terms of the GNU GPL
 *
 */

#include <gtk/gtk.h>
#include <netinet/in.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cheops.h"
#include "plugins.h"

char *plugin_name()
{
	return "vnc";
}

char *plugin_label()
{
	return "VNC";
}


int plugin_type()
{
	return TYPE_SERVICE;
}

int service_connect(struct service *svc, char *hostname, char *ip, char *username, int porti)
{
	service_cb generic_connect;
	generic_connect = get_plugin("standard", TYPE_SERVICE, SERVICE_CONNECT);
	if (!generic_connect)
		return 0;
	return generic_connect(svc, hostname, ip, username, porti - 5900);
}