diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-17 19:22:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-17 19:22:23 +0000 |
commit | 40261ecc5bf242437f12cf91d035c138cf089a1e (patch) | |
tree | b801c2939e97a1ed68e614e74a3ce47765dd82b5 /src/include/gnunet_tun_lib.h | |
parent | 9d077316ac3c6a18a4b13e90d7549188c2fe1f81 (diff) | |
download | gnunet-40261ecc5bf242437f12cf91d035c138cf089a1e.tar.gz gnunet-40261ecc5bf242437f12cf91d035c138cf089a1e.zip |
-move IPv4 header initialization to tun library
Diffstat (limited to 'src/include/gnunet_tun_lib.h')
-rw-r--r-- | src/include/gnunet_tun_lib.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/gnunet_tun_lib.h b/src/include/gnunet_tun_lib.h index dc6f01e1e..ae16bc65f 100644 --- a/src/include/gnunet_tun_lib.h +++ b/src/include/gnunet_tun_lib.h | |||
@@ -148,4 +148,21 @@ struct GNUNET_TUN_DnsHeader | |||
148 | GNUNET_NETWORK_STRUCT_END | 148 | GNUNET_NETWORK_STRUCT_END |
149 | 149 | ||
150 | 150 | ||
151 | /** | ||
152 | * Initialize an IPv4 header. | ||
153 | * | ||
154 | * @param ip header to initialize | ||
155 | * @param protocol protocol to use (i.e. IPPROTO_UDP) | ||
156 | * @param payload_length number of bytes of payload that follow (excluding IPv4 header) | ||
157 | * @param src source IP address to use | ||
158 | * @param dst destination IP address to use | ||
159 | */ | ||
160 | void | ||
161 | GNUNET_TUN_initialize_ipv4_header (struct GNUNET_TUN_IPv4Header *ip, | ||
162 | uint8_t protocol, | ||
163 | uint16_t payload_length, | ||
164 | const struct in_addr *src, | ||
165 | const struct in_addr *dst); | ||
166 | |||
167 | |||
151 | #endif | 168 | #endif |