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
a64f235d
Commit
a64f235d
authored
Nov 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP/2 debug helpers
parent
f94573fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
modules/access/http/h2frame.c
modules/access/http/h2frame.c
+41
-0
modules/access/http/h2frame.h
modules/access/http/h2frame.h
+4
-0
No files found.
modules/access/http/h2frame.c
View file @
a64f235d
...
@@ -260,6 +260,23 @@ struct vlc_h2_frame *vlc_h2_frame_settings_ack(void)
...
@@ -260,6 +260,23 @@ struct vlc_h2_frame *vlc_h2_frame_settings_ack(void)
0
);
0
);
}
}
const
char
*
vlc_h2_setting_name
(
uint_fast16_t
id
)
{
static
const
char
names
[][
20
]
=
{
[
0
]
=
"Unknown setting"
,
[
VLC_H2_SETTING_HEADER_TABLE_SIZE
]
=
"Header table size"
,
[
VLC_H2_SETTING_ENABLE_PUSH
]
=
"Enable push"
,
[
VLC_H2_SETTING_MAX_CONCURRENT_STREAMS
]
=
"Concurrent streams"
,
[
VLC_H2_SETTING_INITIAL_WINDOW_SIZE
]
=
"Initial window size"
,
[
VLC_H2_SETTING_MAX_FRAME_SIZE
]
=
"Frame size"
,
[
VLC_H2_SETTING_MAX_HEADER_LIST_SIZE
]
=
"Header list size"
,
};
if
(
id
>=
sizeof
(
names
)
/
sizeof
(
names
[
0
])
||
names
[
id
][
0
]
==
'\0'
)
id
=
0
;
return
names
[
id
];
}
struct
vlc_h2_frame
*
vlc_h2_frame_ping
(
uint64_t
opaque
)
struct
vlc_h2_frame
*
vlc_h2_frame_ping
(
uint64_t
opaque
)
{
{
struct
vlc_h2_frame
*
f
=
vlc_h2_frame_alloc
(
VLC_H2_FRAME_PING
,
0
,
0
,
8
);
struct
vlc_h2_frame
*
f
=
vlc_h2_frame_alloc
(
VLC_H2_FRAME_PING
,
0
,
0
,
8
);
...
@@ -306,3 +323,27 @@ vlc_h2_frame_window_update(uint_fast32_t stream_id, uint_fast32_t credit)
...
@@ -306,3 +323,27 @@ vlc_h2_frame_window_update(uint_fast32_t stream_id, uint_fast32_t credit)
}
}
return
f
;
return
f
;
}
}
const
char
*
vlc_h2_strerror
(
uint_fast32_t
code
)
{
static
const
char
names
[][
20
]
=
{
[
VLC_H2_NO_ERROR
]
=
"No error"
,
[
VLC_H2_PROTOCOL_ERROR
]
=
"Protocol error"
,
[
VLC_H2_INTERNAL_ERROR
]
=
"Internal error"
,
[
VLC_H2_FLOW_CONTROL_ERROR
]
=
"Flow control error"
,
[
VLC_H2_SETTINGS_TIMEOUT
]
=
"Settings time-out"
,
[
VLC_H2_STREAM_CLOSED
]
=
"Stream closed"
,
[
VLC_H2_FRAME_SIZE_ERROR
]
=
"Frame size error"
,
[
VLC_H2_REFUSED_STREAM
]
=
"Refused stream"
,
[
VLC_H2_CANCEL
]
=
"Cancellation"
,
[
VLC_H2_COMPRESSION_ERROR
]
=
"Compression error"
,
[
VLC_H2_CONNECT_ERROR
]
=
"CONNECT error"
,
[
VLC_H2_ENHANCE_YOUR_CALM
]
=
"Excessive load"
,
[
VLC_H2_INADEQUATE_SECURITY
]
=
"Inadequate security"
,
[
VLC_H2_HTTP_1_1_REQUIRED
]
=
"Required HTTP/1.1"
,
};
if
(
code
>=
sizeof
(
names
)
/
sizeof
(
names
[
0
])
||
names
[
code
][
0
]
==
'\0'
)
return
"Unknown error"
;
return
names
[
code
];
}
modules/access/http/h2frame.h
View file @
a64f235d
...
@@ -61,6 +61,8 @@ enum vlc_h2_error {
...
@@ -61,6 +61,8 @@ enum vlc_h2_error {
VLC_H2_HTTP_1_1_REQUIRED
,
VLC_H2_HTTP_1_1_REQUIRED
,
};
};
const
char
*
vlc_h2_strerror
(
uint_fast32_t
);
enum
vlc_h2_setting
{
enum
vlc_h2_setting
{
VLC_H2_SETTING_HEADER_TABLE_SIZE
=
0x0001
,
VLC_H2_SETTING_HEADER_TABLE_SIZE
=
0x0001
,
VLC_H2_SETTING_ENABLE_PUSH
,
VLC_H2_SETTING_ENABLE_PUSH
,
...
@@ -70,6 +72,8 @@ enum vlc_h2_setting {
...
@@ -70,6 +72,8 @@ enum vlc_h2_setting {
VLC_H2_SETTING_MAX_HEADER_LIST_SIZE
,
VLC_H2_SETTING_MAX_HEADER_LIST_SIZE
,
};
};
const
char
*
vlc_h2_setting_name
(
uint_fast16_t
);
/* Our settings */
/* Our settings */
#define VLC_H2_MAX_HEADER_TABLE 4096
/* Header (compression) table size */
#define VLC_H2_MAX_HEADER_TABLE 4096
/* Header (compression) table size */
#define VLC_H2_MAX_STREAMS 0
/* Concurrent peer-initiated streams */
#define VLC_H2_MAX_STREAMS 0
/* Concurrent peer-initiated streams */
...
...
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