Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers altcp_proxyconnect.h Source File

altcp_proxyconnect.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  * Application layered TCP connection API that executes a proxy-connect.
00004  *
00005  * This file provides a starting layer that executes a proxy-connect e.g. to
00006  * set up TLS connections through a http proxy.
00007  */
00008 
00009 /*
00010  * Copyright (c) 2018 Simon Goldschmidt
00011  * All rights reserved.
00012  *
00013  * Redistribution and use in source and binary forms, with or without modification,
00014  * are permitted provided that the following conditions are met:
00015  *
00016  * 1. Redistributions of source code must retain the above copyright notice,
00017  *    this list of conditions and the following disclaimer.
00018  * 2. Redistributions in binary form must reproduce the above copyright notice,
00019  *    this list of conditions and the following disclaimer in the documentation
00020  *    and/or other materials provided with the distribution.
00021  * 3. The name of the author may not be used to endorse or promote products
00022  *    derived from this software without specific prior written permission.
00023  *
00024  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00025  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00026  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
00027  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00028  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00029  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00031  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00032  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00033  * OF SUCH DAMAGE.
00034  *
00035  * This file is part of the lwIP TCP/IP stack.
00036  *
00037  * Author: Simon Goldschmidt <goldsimon@gmx.de>
00038  *
00039  */
00040 
00041 #ifndef LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H
00042 #define LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H
00043 
00044 #include "lwip/opt.h"
00045 
00046 #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */
00047 
00048 #include "lwip/ip_addr.h"
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053 
00054 struct altcp_proxyconnect_config {
00055   ip_addr_t proxy_addr;
00056   u16_t proxy_port;
00057 };
00058 
00059 
00060 struct altcp_pcb *altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb);
00061 struct altcp_pcb *altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type);
00062 
00063 struct altcp_pcb *altcp_proxyconnect_alloc(void *arg, u8_t ip_type);
00064 
00065 #if LWIP_ALTCP_TLS
00066 struct altcp_proxyconnect_tls_config {
00067   struct altcp_proxyconnect_config proxy;
00068   struct altcp_tls_config *tls_config;
00069 };
00070 
00071 struct altcp_pcb *altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type);
00072 #endif /* LWIP_ALTCP_TLS */
00073 
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077 
00078 #endif /* LWIP_ALTCP */
00079 #endif /* LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H */