OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
d1_both.c File Reference
#include <limits.h>
#include <string.h>
#include <stdio.h>
#include "ssl_locl.h"
#include <openssl/buffer.h>
#include <openssl/rand.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>

Go to the source code of this file.

Macros

#define RSMBLY_BITMASK_SIZE(msg_len)   (((msg_len) + 7) / 8)
 
#define RSMBLY_BITMASK_MARK(bitmask, start, end)
 
#define RSMBLY_BITMASK_IS_COMPLETE(bitmask, msg_len, is_complete)
 

Functions

int dtls1_do_write (SSL *s, int type)
 
long dtls1_get_message (SSL *s, int st1, int stn, int mt, long max, int *ok)
 
int dtls1_send_finished (SSL *s, int a, int b, const char *sender, int slen)
 
int dtls1_send_change_cipher_spec (SSL *s, int a, int b)
 
unsigned long dtls1_output_cert_chain (SSL *s, X509 *x)
 
int dtls1_read_failed (SSL *s, int code)
 
int dtls1_get_queue_priority (unsigned short seq, int is_ccs)
 
int dtls1_retransmit_buffered_messages (SSL *s)
 
int dtls1_buffer_message (SSL *s, int is_ccs)
 
int dtls1_retransmit_message (SSL *s, unsigned short seq, unsigned long frag_off, int *found)
 
void dtls1_clear_record_buffer (SSL *s)
 
unsigned char * dtls1_set_message_header (SSL *s, unsigned char *p, unsigned char mt, unsigned long len, unsigned long frag_off, unsigned long frag_len)
 
unsigned int dtls1_min_mtu (void)
 
void dtls1_get_message_header (unsigned char *data, struct hm_header_st *msg_hdr)
 
void dtls1_get_ccs_header (unsigned char *data, struct ccs_header_st *ccs_hdr)
 
int dtls1_shutdown (SSL *s)
 
int dtls1_process_heartbeat (SSL *s)
 
int dtls1_heartbeat (SSL *s)
 

Macro Definition Documentation

#define RSMBLY_BITMASK_IS_COMPLETE (   bitmask,
  msg_len,
  is_complete 
)
Value:
{ \
long ii; \
OPENSSL_assert((msg_len) > 0); \
is_complete = 1; \
if (bitmask[(((msg_len) - 1) >> 3)] != bitmask_end_values[((msg_len) & 7)]) is_complete = 0; \
if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \
if (bitmask[ii] != 0xff) { is_complete = 0; break; } }

Definition at line 139 of file d1_both.c.

#define RSMBLY_BITMASK_MARK (   bitmask,
  start,
  end 
)
Value:
{ \
if ((end) - (start) <= 8) { \
long ii; \
for (ii = (start); ii < (end); ii++) bitmask[((ii) >> 3)] |= (1 << ((ii) & 7)); \
} else { \
long ii; \
bitmask[((start) >> 3)] |= bitmask_start_values[((start) & 7)]; \
for (ii = (((start) >> 3) + 1); ii < ((((end) - 1)) >> 3); ii++) bitmask[ii] = 0xff; \
bitmask[(((end) - 1) >> 3)] |= bitmask_end_values[((end) & 7)]; \
} }

Definition at line 128 of file d1_both.c.

#define RSMBLY_BITMASK_SIZE (   msg_len)    (((msg_len) + 7) / 8)

Definition at line 126 of file d1_both.c.

Function Documentation

int dtls1_buffer_message ( SSL s,
int  is_ccs 
)

Definition at line 1156 of file d1_both.c.

void dtls1_clear_record_buffer ( SSL s)

Definition at line 1312 of file d1_both.c.

int dtls1_do_write ( SSL s,
int  type 
)

Definition at line 223 of file d1_both.c.

void dtls1_get_ccs_header ( unsigned char *  data,
struct ccs_header_st ccs_hdr 
)

Definition at line 1418 of file d1_both.c.

long dtls1_get_message ( SSL s,
int  st1,
int  stn,
int  mt,
long  max,
int *  ok 
)

Definition at line 408 of file d1_both.c.

void dtls1_get_message_header ( unsigned char *  data,
struct hm_header_st msg_hdr 
)

Definition at line 1406 of file d1_both.c.

int dtls1_get_queue_priority ( unsigned short  seq,
int  is_ccs 
)

Definition at line 1116 of file d1_both.c.

int dtls1_heartbeat ( SSL s)

Definition at line 1518 of file d1_both.c.

unsigned int dtls1_min_mtu ( void  )

Definition at line 1384 of file d1_both.c.

unsigned long dtls1_output_cert_chain ( SSL s,
X509 x 
)

Definition at line 1013 of file d1_both.c.

int dtls1_process_heartbeat ( SSL s)

Definition at line 1448 of file d1_both.c.

int dtls1_read_failed ( SSL s,
int  code 
)

Definition at line 1072 of file d1_both.c.

int dtls1_retransmit_buffered_messages ( SSL s)

Definition at line 1130 of file d1_both.c.

int dtls1_retransmit_message ( SSL s,
unsigned short  seq,
unsigned long  frag_off,
int *  found 
)

Definition at line 1219 of file d1_both.c.

int dtls1_send_change_cipher_spec ( SSL s,
int  a,
int  b 
)

Definition at line 963 of file d1_both.c.

int dtls1_send_finished ( SSL s,
int  a,
int  b,
const char *  sender,
int  slen 
)

Definition at line 898 of file d1_both.c.

unsigned char* dtls1_set_message_header ( SSL s,
unsigned char *  p,
unsigned char  mt,
unsigned long  len,
unsigned long  frag_off,
unsigned long  frag_len 
)

Definition at line 1326 of file d1_both.c.

int dtls1_shutdown ( SSL s)

Definition at line 1425 of file d1_both.c.