lwIP 2.1.2 Lightweight IP stack

Macros | Functions
altcp_proxyconnect.c File Reference
`#include "lwip/apps/altcp_proxyconnect.h"`
`#include "lwip/altcp.h"`
`#include "lwip/priv/altcp_priv.h"`
`#include "lwip/altcp_tcp.h"`
`#include "lwip/altcp_tls.h"`
`#include "lwip/mem.h"`
`#include "lwip/init.h"`
`#include <stdio.h>`

## Macros
#define | ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)"

## Functions
struct altcp_pcb * | altcp_proxyconnect_new (struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb)
struct altcp_pcb * | altcp_proxyconnect_new_tcp (struct altcp_proxyconnect_config *config, u8_t ip_type)
struct altcp_pcb * | altcp_proxyconnect_alloc (void *arg, u8_t ip_type)
struct altcp_pcb * | altcp_proxyconnect_tls_alloc (void *arg, u8_t ip_type)

## Detailed Description

Application layered TCP connection API that executes a proxy-connect.

This file provides a starting layer that executes a proxy-connect e.g. to set up TLS connections through a http proxy.

## Macro Definition Documentation

## ◆ ALTCP_PROXYCONNECT_CLIENT_AGENT

#define ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)"

This string is passed in the HTTP header as "User-Agent: "

## Function Documentation

## ◆ altcp_proxyconnect_alloc()

struct altcp_pcb* altcp_proxyconnect_alloc | ( | void * | arg,
|  | u8_t | ip_type
| ) |  |

Allocator function to allocate a proxy connect altcp pcb connecting directly via tcp to the proxy.

The returned pcb is a chain: altcp_proxyconnect - altcp_tcp - tcp pcb

This function is meant for use with altcp_new.

Parameters

  arg | struct altcp_proxyconnect_config that contains the proxy settings
  ip_type | IP type of the connection (lwip_ip_addr_type)

## ◆ altcp_proxyconnect_new()

struct altcp_pcb* altcp_proxyconnect_new | ( | struct altcp_proxyconnect_config * | config,
|  | struct altcp_pcb * | inner_pcb
| ) |  |

Allocate a new altcp layer connecting through a proxy. This function gets the inner pcb passed.

Parameters

  config | struct altcp_proxyconnect_config that contains the proxy settings
  inner_pcb | pcb that makes the connection to the proxy (i.e. tcp pcb)

## ◆ altcp_proxyconnect_new_tcp()

struct altcp_pcb* altcp_proxyconnect_new_tcp | ( | struct altcp_proxyconnect_config * | config,
|  | u8_t | ip_type
| ) |  |

Allocate a new altcp layer connecting through a proxy. This function allocates the inner pcb as tcp pcb, resulting in a direct tcp connection to the proxy.

Parameters

  config | struct altcp_proxyconnect_config that contains the proxy settings
  ip_type | IP type of the connection (lwip_ip_addr_type)

## ◆ altcp_proxyconnect_tls_alloc()

struct altcp_pcb* altcp_proxyconnect_tls_alloc | ( | void * | arg,
|  | u8_t | ip_type
| ) |  |

Allocator function to allocate a TLS connection through a proxy.

The returned pcb is a chain: altcp_tls - altcp_proxyconnect - altcp_tcp - tcp pcb

This function is meant for use with altcp_new.

Parameters

  arg | struct altcp_proxyconnect_tls_config that contains the proxy settings and tls settings
  ip_type | IP type of the connection (lwip_ip_addr_type)