Apache2
h2_push.h File Reference
#include <http_protocol.h>
#include "h2.h"
#include "h2_headers.h"
Include dependency graph for h2_push.h:

Go to the source code of this file.

Data Structures

struct  h2_push
 
struct  h2_push_diary
 

Typedefs

typedef struct h2_push h2_push
 
typedef struct h2_push_diary h2_push_diary
 
typedef void h2_push_digest_calc(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push)
 

Enumerations

enum  h2_push_digest_type { H2_PUSH_DIGEST_APR_HASH , H2_PUSH_DIGEST_SHA256 }
 

Functions

apr_array_header_th2_push_collect (apr_pool_t *p, const struct h2_request *req, apr_uint32_t push_policy, const struct h2_headers *res)
 
h2_push_diaryh2_push_diary_create (apr_pool_t *p, int N)
 
apr_array_header_th2_push_diary_update (struct h2_session *session, apr_array_header_t *pushes)
 
apr_array_header_th2_push_collect_update (struct h2_stream *stream, const struct h2_request *req, const struct h2_headers *res)
 
apr_status_t h2_push_diary_digest_get (h2_push_diary *diary, apr_pool_t *p, int maxP, const char *authority, const char **pdata, apr_size_t *plen)
 

Typedef Documentation

◆ h2_push

typedef struct h2_push h2_push

◆ h2_push_diary

typedef struct h2_push_diary h2_push_diary

◆ h2_push_digest_calc

typedef void h2_push_digest_calc(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push)

Enumeration Type Documentation

◆ h2_push_digest_type

Enumerator
H2_PUSH_DIGEST_APR_HASH 
H2_PUSH_DIGEST_SHA256 

Function Documentation

◆ h2_push_collect()

apr_array_header_t* h2_push_collect ( apr_pool_t p,
const struct h2_request req,
apr_uint32_t  push_policy,
const struct h2_headers res 
)

Determine the list of h2_push'es to send to the client on behalf of the given request/response pair.

Parameters
pthe pool to use
reqthe requst from the client
resthe response from the server
Returns
array of h2_push addresses or NULL

◆ h2_push_collect_update()

apr_array_header_t* h2_push_collect_update ( struct h2_stream stream,
const struct h2_request req,
const struct h2_headers res 
)

Collect pushes for the given request/response pair, enter them into the diary and return those pushes newly entered.

◆ h2_push_diary_create()

h2_push_diary* h2_push_diary_create ( apr_pool_t p,
int  N 
)

Create a new push diary for the given maximum number of entries.

Parameters
pthe pool to use
Nthe max number of entries, rounded up to 2^x
Returns
the created diary, might be NULL of max_entries is 0

◆ h2_push_diary_digest_get()

apr_status_t h2_push_diary_digest_get ( h2_push_diary diary,
apr_pool_t p,
int  maxP,
const char *  authority,
const char **  pdata,
apr_size_t plen 
)

Get a cache digest as described in https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/ from the contents of the push diary.

Parameters
diarythe diary to calculdate the digest from
pthe pool to use
authoritythe authority to get the data for, use NULL/"*" for all
pdataon successful return, the binary cache digest
plenon successful return, the length of the binary data

◆ h2_push_diary_update()

apr_array_header_t* h2_push_diary_update ( struct h2_session session,
apr_array_header_t pushes 
)

Filters the given pushes against the diary and returns only those pushes that were newly entered in the diary.