Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
052df94a
Commit
052df94a
authored
Nov 19, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP/2 frame parser
parent
a64f235d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
711 additions
and
0 deletions
+711
-0
modules/access/http/h2frame.c
modules/access/http/h2frame.c
+669
-0
modules/access/http/h2frame.h
modules/access/http/h2frame.h
+42
-0
No files found.
modules/access/http/h2frame.c
View file @
052df94a
This diff is collapsed.
Click to expand it.
modules/access/http/h2frame.h
View file @
052df94a
...
...
@@ -27,6 +27,8 @@ struct vlc_h2_frame
uint8_t
data
[];
};
size_t
vlc_h2_frame_size
(
const
struct
vlc_h2_frame
*
);
struct
vlc_h2_frame
*
vlc_h2_frame_headers
(
uint_fast32_t
stream_id
,
uint_fast32_t
mtu
,
bool
eos
,
unsigned
count
,
const
char
*
const
headers
[][
2
]);
...
...
@@ -44,6 +46,12 @@ vlc_h2_frame_goaway(uint_fast32_t last_stream_id, uint_fast32_t error_code);
struct
vlc_h2_frame
*
vlc_h2_frame_window_update
(
uint_fast32_t
stream_id
,
uint_fast32_t
credit
);
struct
vlc_object_t
;
void
vlc_h2_frame_dump
(
struct
vlc_object_t
*
,
const
struct
vlc_h2_frame
*
,
const
char
*
);
#define vlc_h2_frame_dump(o, f, m) vlc_h2_frame_dump(VLC_OBJECT(o), f, m)
enum
vlc_h2_error
{
VLC_H2_NO_ERROR
,
VLC_H2_PROTOCOL_ERROR
,
...
...
@@ -85,3 +93,37 @@ const char *vlc_h2_setting_name(uint_fast16_t);
#define VLC_H2_DEFAULT_MAX_HEADER_TABLE 4096
#define VLC_H2_DEFAULT_INIT_WINDOW 65535
#define VLC_H2_DEFAULT_MAX_FRAME 16384
struct
vlc_h2_parser
;
struct
vlc_h2_parser_cbs
{
void
(
*
setting
)(
void
*
ctx
,
uint_fast16_t
id
,
uint_fast32_t
value
);
int
(
*
settings_done
)(
void
*
ctx
);
int
(
*
ping
)(
void
*
ctx
,
uint_fast64_t
opaque
);
void
(
*
error
)(
void
*
ctx
,
uint_fast32_t
code
);
int
(
*
reset
)(
void
*
ctx
,
uint_fast32_t
last_seq
,
uint_fast32_t
code
);
void
(
*
window_status
)(
void
*
ctx
,
uint32_t
*
rcwd
);
void
*
(
*
stream_lookup
)(
void
*
ctx
,
uint_fast32_t
id
);
int
(
*
stream_error
)(
void
*
ctx
,
uint_fast32_t
id
,
uint_fast32_t
code
);
void
(
*
stream_headers
)(
void
*
ctx
,
unsigned
count
,
char
*
headers
[][
2
]);
int
(
*
stream_data
)(
void
*
ctx
,
struct
vlc_h2_frame
*
f
);
void
(
*
stream_end
)(
void
*
ctx
);
int
(
*
stream_reset
)(
void
*
ctx
,
uint_fast32_t
code
);
};
struct
vlc_h2_parser
*
vlc_h2_parse_init
(
void
*
ctx
,
const
struct
vlc_h2_parser_cbs
*
cbs
);
int
vlc_h2_parse
(
struct
vlc_h2_parser
*
,
struct
vlc_h2_frame
*
);
void
vlc_h2_parse_destroy
(
struct
vlc_h2_parser
*
);
#define VLC_H2_MAX_HEADERS 255
const
uint8_t
*
vlc_h2_frame_data_get
(
const
struct
vlc_h2_frame
*
f
,
size_t
*
restrict
len
);
#if (__STDC_VERSION__ >= 201112L)
#define vlc_h2_frame_data_get(f, l) \
_Generic((f), \
const struct vlc_h2_frame *: (vlc_h2_frame_data_get)(f, l), \
struct vlc_h2_frame *: (uint8_t *)(vlc_h2_frame_data_get)(f, l))
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment