[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19767 - in gnunet/src: exit vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19767 - in gnunet/src: exit vpn |
Date: |
Sun, 12 Feb 2012 20:27:27 +0100 |
Author: grothoff
Date: 2012-02-12 20:27:27 +0100 (Sun, 12 Feb 2012)
New Revision: 19767
Modified:
gnunet/src/exit/exit.h
gnunet/src/vpn/vpn.h
Log:
-add missing packed
Modified: gnunet/src/exit/exit.h
===================================================================
--- gnunet/src/exit/exit.h 2012-02-12 19:15:23 UTC (rev 19766)
+++ gnunet/src/exit/exit.h 2012-02-12 19:27:27 UTC (rev 19767)
@@ -28,6 +28,8 @@
#include "gnunet_util_lib.h"
+GNUNET_NETWORK_STRUCT_BEGIN
+
/**
* Message send via mesh to an exit daemon to initiate forwarding of
* TCP data to a local service.
@@ -42,12 +44,12 @@
/**
* Always 0.
*/
- uint32_t reserved;
+ uint32_t reserved GNUNET_PACKED;
/**
* Identification for the desired service.
*/
- GNUNET_HashCode service_descriptor;
+ GNUNET_HashCode service_descriptor GNUNET_PACKED;
/**
* Skeleton of the TCP header to send. Port numbers are to
@@ -73,7 +75,7 @@
/**
* Address family, AF_INET or AF_INET6, in network byte order.
*/
- int32_t af;
+ int32_t af GNUNET_PACKED;
/**
* Skeleton of the TCP header to send. Port numbers are to
@@ -104,7 +106,7 @@
/**
* Always 0.
*/
- uint32_t reserved;
+ uint32_t reserved GNUNET_PACKED;
/**
* Skeleton of the TCP header to send. Port numbers are to
@@ -130,17 +132,17 @@
/**
* Source port to use for the UDP request (0 to use a random port). In NBO.
*/
- uint16_t source_port;
+ uint16_t source_port GNUNET_PACKED;
/**
* Destination port to use for the UDP request. In NBO.
*/
- uint16_t destination_port;
+ uint16_t destination_port GNUNET_PACKED;
/**
* Identification for the desired service.
*/
- GNUNET_HashCode service_descriptor;
+ GNUNET_HashCode service_descriptor GNUNET_PACKED;
/* followed by UDP payload */
};
@@ -160,17 +162,17 @@
/**
* Address family, AF_INET or AF_INET6, in network byte order.
*/
- int32_t af;
+ int32_t af GNUNET_PACKED;
/**
* Source port to use for the UDP request (0 to use a random port). In NBO.
*/
- uint16_t source_port;
+ uint16_t source_port GNUNET_PACKED;
/**
* Destination port to use for the UDP request. In NBO.
*/
- uint16_t destination_port;
+ uint16_t destination_port GNUNET_PACKED;
/* followed by IP address of the destination; either
'struct in_addr' or 'struct in6_addr', depending on af */
@@ -194,13 +196,13 @@
* Source port to use for the UDP reply (0 to use the same
* port as for the original request). In NBO.
*/
- uint16_t source_port;
+ uint16_t source_port GNUNET_PACKED;
/**
* Destination port to use for the UDP reply (0 to use the same
* port as for the original request). In NBO.
*/
- uint16_t destination_port;
+ uint16_t destination_port GNUNET_PACKED;
/* followed by UDP payload */
};
@@ -223,12 +225,12 @@
* The receiver (exit) may still have to translate (PT) to the services'
* ICMP version (if possible).
*/
- int32_t af;
+ int32_t af GNUNET_PACKED;
/**
* Identification for the desired service.
*/
- GNUNET_HashCode service_descriptor;
+ GNUNET_HashCode service_descriptor GNUNET_PACKED;
/**
* ICMP header to use.
@@ -259,7 +261,7 @@
* the IP address format that is used for the target IP. If
* PT is necessary, the sender has already done it.
*/
- int32_t af;
+ int32_t af GNUNET_PACKED;
/**
* ICMP header to use. Must match the target 'af' given
@@ -292,7 +294,7 @@
* Address family, AF_INET or AF_INET6, in network byte order.
* Useful to determine if this is an ICMPv4 or ICMPv6 header.
*/
- int32_t af;
+ int32_t af GNUNET_PACKED;
/**
* ICMP header to use. ICMPv4 or ICMPv6, depending on 'af'.
@@ -306,4 +308,6 @@
};
+GNUNET_NETWORK_STRUCT_END
+
#endif
Modified: gnunet/src/vpn/vpn.h
===================================================================
--- gnunet/src/vpn/vpn.h 2012-02-12 19:15:23 UTC (rev 19766)
+++ gnunet/src/vpn/vpn.h 2012-02-12 19:27:27 UTC (rev 19767)
@@ -28,6 +28,8 @@
#include "gnunet_util_lib.h"
+GNUNET_NETWORK_STRUCT_BEGIN
+
/**
* Message send by the VPN client to the VPN service requesting
* the setup of a redirection from some IP via an exit node to
@@ -44,7 +46,7 @@
* GNUNET_YES to notify only after completion of the mesh-level connection,
* GNUNET_NO to notify as soon as an address was allocated (in nbo).
*/
- int32_t nac;
+ int32_t nac GNUNET_PACKED;
/**
* How long should the redirection be maintained at most?
@@ -54,18 +56,18 @@
/**
* Address family desired for the result (AF_INET or AF_INET6 or AF_UNSPEC,
in nbo)
*/
- int32_t result_af;
+ int32_t result_af GNUNET_PACKED;
/**
* Address family used for the destination address (AF_INET or AF_INET6, in
nbo)
*/
- int32_t addr_af;
+ int32_t addr_af GNUNET_PACKED;
/**
* Unique ID to match a future response to this request.
* Picked by the client.
*/
- uint64_t request_id;
+ uint64_t request_id GNUNET_PACKED;
/* followed by destination address ('struct in_addr' or 'struct in6_addr') */
@@ -88,7 +90,7 @@
* GNUNET_YES to notify only after completion of the mesh-level connection,
* GNUNET_NO to notify as soon as an address was allocated (in nbo).
*/
- int32_t nac;
+ int32_t nac GNUNET_PACKED;
/**
* How long should the redirection be maintained at most?
@@ -98,12 +100,12 @@
/**
* Desired protocol (IPPROTO_UDP or IPPROTO_TCP)
*/
- int32_t protocol;
+ int32_t protocol GNUNET_PACKED;
/**
* Address family desired for the result (AF_INET or AF_INET6 or AF_UNSPEC,
in nbo)
*/
- int32_t result_af;
+ int32_t result_af GNUNET_PACKED;
/**
* Target peer offering the service.
@@ -113,13 +115,13 @@
/**
* Service descriptor identifying the service.
*/
- GNUNET_HashCode service_descriptor;
+ GNUNET_HashCode service_descriptor GNUNET_PACKED;
/**
* Unique ID to match a future response to this request.
* Picked by the client.
*/
- uint64_t request_id;
+ uint64_t request_id GNUNET_PACKED;
};
@@ -140,16 +142,18 @@
* Address family of the allocated address that follows; will match
* "result_af" from the request, of be "AF_UNSPEC" on errors.
*/
- int32_t result_af;
+ int32_t result_af GNUNET_PACKED;
/**
* Unique ID to match the response to a request.
*/
- uint64_t request_id;
+ uint64_t request_id GNUNET_PACKED;
/* followed by destination address ('struct in_addr' or 'struct in6_addr') */
};
+GNUNET_NETWORK_STRUCT_END
+
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19767 - in gnunet/src: exit vpn,
gnunet <=