File: noproxy.c

package info (click to toggle)
putty 0.83-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,216 kB
  • sloc: ansic: 148,476; python: 8,466; perl: 1,830; makefile: 128; sh: 117
file content (32 lines) | stat: -rw-r--r-- 1,202 bytes parent folder | download | duplicates (2)
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
/*
 * noproxy.c: an alternative to proxy.c, for use by auxiliary programs
 * that need to make network connections but don't want to include all
 * the full-on support for endless network proxies (and its
 * configuration requirements). Implements the primary APIs of
 * proxy.c, but maps them straight to the underlying network layer.
 */

#include "putty.h"
#include "network.h"
#include "proxy.h"

SockAddr *name_lookup(const char *host, int port, char **canonicalname,
                      Conf *conf, int addressfamily, LogContext *logctx,
                      const char *reason)
{
    return sk_namelookup(host, canonicalname, addressfamily);
}

Socket *new_connection(SockAddr *addr, const char *hostname,
                       int port, bool privport,
                       bool oobinline, bool nodelay, bool keepalive,
                       Plug *plug, Conf *conf, Interactor *itr)
{
    return sk_new(addr, port, privport, oobinline, nodelay, keepalive, plug);
}

Socket *new_listener(const char *srcaddr, int port, Plug *plug,
                     bool local_host_only, Conf *conf, int addressfamily)
{
    return sk_newlistener(srcaddr, port, plug, local_host_only, addressfamily);
}