f

Dependencies:   mbed

Fork of lwip by mbed unsupported

Committer:
root@mbed.org
Date:
Tue May 08 15:32:10 2012 +0100
Revision:
0:5e1631496985
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
root@mbed.org 0:5e1631496985 1 #ifndef LWIP_UTILS_H
root@mbed.org 0:5e1631496985 2 #define LWIP_UTILS_H
root@mbed.org 0:5e1631496985 3
root@mbed.org 0:5e1631496985 4 #include "ipv4/lwip/ip_addr.h"
root@mbed.org 0:5e1631496985 5
root@mbed.org 0:5e1631496985 6 #ifdef __cplusplus
root@mbed.org 0:5e1631496985 7 extern "C" {
root@mbed.org 0:5e1631496985 8 #endif
root@mbed.org 0:5e1631496985 9
root@mbed.org 0:5e1631496985 10 /**
root@mbed.org 0:5e1631496985 11 * This method converts 4 given IPv4 tuples to struct ip_addr classes.
root@mbed.org 0:5e1631496985 12 * The Byte are seperated by ,
root@mbed.org 0:5e1631496985 13 * Does only work with seperated 4 Byte tuple.
root@mbed.org 0:5e1631496985 14 */
root@mbed.org 0:5e1631496985 15 inline struct ip_addr IPv4(u8_t ip0, u8_t ip1, u8_t ip2, u8_t ip3) {
root@mbed.org 0:5e1631496985 16 struct ip_addr addr;
root@mbed.org 0:5e1631496985 17 IP4_ADDR(&addr, ip0, ip1, ip2, ip3);
root@mbed.org 0:5e1631496985 18 return addr;
root@mbed.org 0:5e1631496985 19 }
root@mbed.org 0:5e1631496985 20
root@mbed.org 0:5e1631496985 21 unsigned int base64enc_len(const char *str);
root@mbed.org 0:5e1631496985 22
root@mbed.org 0:5e1631496985 23 void base64enc(const char *input, unsigned int length, char *output);
root@mbed.org 0:5e1631496985 24
root@mbed.org 0:5e1631496985 25 #ifdef __cplusplus
root@mbed.org 0:5e1631496985 26 }
root@mbed.org 0:5e1631496985 27 #endif
root@mbed.org 0:5e1631496985 28
root@mbed.org 0:5e1631496985 29 #endif /* LWIP_UTILS_H */