Add the ability to configure anti-replay via SSL_CONF
[openssl.git] / ssl / packet_locl.h
index cd702653370f61c561dc4938a2363e63cfc17b3d..fd32a640112aa39a56946b931967b8010c3ee8a7 100644 (file)
 
 # include "internal/numbers.h"
 
-# ifdef __cplusplus
-extern "C" {
-# endif
-
 typedef struct {
     /* Pointer to where we are currently reading from */
     const unsigned char *curr;
@@ -700,11 +696,11 @@ int WPACKET_close(WPACKET *pkt);
 int WPACKET_finish(WPACKET *pkt);
 
 /*
- * Iterates through all the sub-packets and writes out their lengths as if they
+ * Iterate through all the sub-packets and write out their lengths as if they
  * were being closed. The lengths will be overwritten with the final lengths
  * when the sub-packets are eventually closed (which may be different if more
- * data is added to the WPACKET). This function will fail if a sub-packet is of
- * 0 length and WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH is used.
+ * data is added to the WPACKET). This function fails if a sub-packet is of 0
+ * length and WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH is set.
  */
 int WPACKET_fill_lengths(WPACKET *pkt);
 
@@ -833,6 +829,9 @@ int WPACKET_set_max_size(WPACKET *pkt, size_t maxsize);
 /* Copy |len| bytes of data from |*src| into the WPACKET. */
 int WPACKET_memcpy(WPACKET *pkt, const void *src, size_t len);
 
+/* Set |len| bytes of data to |ch| into the WPACKET. */
+int WPACKET_memset(WPACKET *pkt, int ch, size_t len);
+
 /*
  * Copy |len| bytes of data from |*src| into the WPACKET and prefix with its
  * length (consuming |lenbytes| of data for the length). Don't call this
@@ -872,8 +871,4 @@ unsigned char *WPACKET_get_curr(WPACKET *pkt);
 /* Release resources in a WPACKET if a failure has occurred. */
 void WPACKET_cleanup(WPACKET *pkt);
 
-# ifdef __cplusplus
-}
-# endif
-
 #endif                          /* HEADER_PACKET_LOCL_H */