File: proxy.h

package info (click to toggle)
diald 0.99.4-5
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 1,076 kB
  • ctags: 936
  • sloc: ansic: 7,109; tcl: 977; sh: 891; perl: 306; makefile: 110
file content (27 lines) | stat: -rw-r--r-- 783 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
/*
 * proxy.h - Proxy interface stuff.
 *
 * Copyright (c) 1999 Mike Jagdis.
 * All rights reserved. Please see the file LICENSE which should be
 * distributed with this software for terms of use.
 */

typedef struct proxy proxy_t;

struct proxy {
	char iftype[12];
	int ifunit;
	int fd;
	int (*send)(proxy_t *, unsigned short, unsigned char *, size_t);
	int (*recv)(proxy_t *, unsigned char *, size_t);
	int (*init)(proxy_t *, char *);
	void (*start)(proxy_t *);
	void (*stop)(proxy_t *);
	void (*close)(proxy_t *);
	void (*release)(proxy_t *);
};

extern int proxy_init(proxy_t *proxy, char *proxydev);
extern int proxy_dev_init(proxy_t *proxy, char *proxydev);
extern int proxy_tap_init(proxy_t *proxy, char *proxydev);
extern int proxy_slip_init(proxy_t *proxy, char *proxydev);