diff options
-rw-r--r-- | debian/libwireshark0.symbols | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-http.h | 3 | ||||
-rw-r--r-- | ui/cli/tap-httpstat.c | 82 |
3 files changed, 7 insertions, 79 deletions
diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols index 7a15882295..4842cca866 100644 --- a/debian/libwireshark0.symbols +++ b/debian/libwireshark0.symbols @@ -1948,6 +1948,7 @@ libwireshark.so.0 libwireshark0 #MINVER# unsigned_time_secs_to_str@Base 2.1.0 update_crc10_by_bytes_tvb@Base 1.99.0 uri_str_to_bytes@Base 1.9.1 + vals_http_status_code@Base 3.3.0 val64_string_ext_free@Base 2.9.0 val64_string_ext_new@Base 2.9.0 val64_to_str@Base 1.12.0~rc1 diff --git a/epan/dissectors/packet-http.h b/epan/dissectors/packet-http.h index 18c09fa8ac..823e86ed4d 100644 --- a/epan/dissectors/packet-http.h +++ b/epan/dissectors/packet-http.h @@ -13,7 +13,7 @@ #include <epan/packet.h> #include "ws_symbol_export.h" -extern const value_string vals_http_status_code[]; +WS_DLL_PUBLIC const value_string vals_http_status_code[]; WS_DLL_PUBLIC void http_tcp_dissector_add(guint32 port, dissector_handle_t handle); @@ -35,6 +35,7 @@ typedef struct _http_info_value_t { const gchar *location_target; } http_info_value_t; + /** information about a request and response on a HTTP conversation. */ typedef struct _http_req_res_t { /** the running number on the conversation */ diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c index 25f4bbedfe..d4eb53b832 100644 --- a/ui/cli/tap-httpstat.c +++ b/ui/cli/tap-httpstat.c @@ -51,80 +51,6 @@ typedef struct _http_request_methode_t { } http_request_methode_t; -static const value_string vals_status_code[] = { - { 100, "Continue" }, - { 101, "Switching Protocols" }, - { 102, "Processing" }, - { 103, "Early Hints" }, - { 199, "Informational - Others" }, - - { 200, "OK"}, - { 201, "Created"}, - { 202, "Accepted"}, - { 203, "Non-authoritative Information"}, - { 204, "No Content"}, - { 205, "Reset Content"}, - { 206, "Partial Content"}, - { 207, "Multi-Status"}, - { 208, "Already Reported"}, - { 226, "IM Used"}, - { 299, "Success - Others"}, /* used to keep track of others Success packets */ - - { 300, "Multiple Choices"}, - { 301, "Moved Permanently"}, - { 302, "Moved Temporarily"}, - { 303, "See Other"}, - { 304, "Not Modified"}, - { 305, "Use Proxy"}, - { 307, "Temporary Redirect"}, - { 308, "Permanent Redirect"}, - { 399, "Redirection - Others"}, - - { 400, "Bad Request"}, - { 401, "Unauthorized"}, - { 402, "Payment Required"}, - { 403, "Forbidden"}, - { 404, "Not Found"}, - { 405, "Method Not Allowed"}, - { 406, "Not Acceptable"}, - { 407, "Proxy Authentication Required"}, - { 408, "Request Time-out"}, - { 409, "Conflict"}, - { 410, "Gone"}, - { 411, "Length Required"}, - { 412, "Precondition Failed"}, - { 413, "Request Entity Too Large"}, - { 414, "Request-URI Too Large"}, - { 415, "Unsupported Media Type"}, - { 416, "Range Not Satifiable"}, - { 417, "Expectation Failed"}, - { 421, "Misdirected Request"}, - { 422, "Unprocessable Entity"}, - { 423, "Locked"}, - { 424, "Failed Dependency"}, - { 426, "Upgrade Required"}, - { 428, "Precondition Required"}, - { 429, "Too Many Requests"}, - { 431, "Request Header Fields Too Large"}, - { 451, "Unavailable For Legal Reasons"}, - { 499, "Client Error - Others"}, - - { 500, "Internal Server Error"}, - { 501, "Not Implemented"}, - { 502, "Bad Gateway"}, - { 503, "Service Unavailable"}, - { 504, "Gateway Time-out"}, - { 505, "HTTP Version not supported"}, - { 506, "Variant Also Negotiates"}, - { 507, "Insufficient Storage"}, - { 508, "Loop Detected"}, - { 510, "Not Extended"}, - { 511, "Network Authentication Required"}, - { 599, "Server Error - Others"}, - - { 0, NULL} -} ; - /* insert some entries */ static void http_init_hash(httpstat_t *sp) @@ -133,14 +59,14 @@ http_init_hash(httpstat_t *sp) sp->hash_responses = g_hash_table_new(g_direct_hash, g_direct_equal); - for (i=0; vals_status_code[i].strptr; i++) + for (i=0; vals_http_status_code[i].strptr; i++) { http_response_code_t *sc = g_new (http_response_code_t, 1); sc->packets = 0; - sc->response_code = vals_status_code[i].value; - sc->name = vals_status_code[i].strptr; + sc->response_code = vals_http_status_code[i].value; + sc->name = vals_http_status_code[i].strptr; sc->sp = sp; - g_hash_table_insert(sc->sp->hash_responses, GUINT_TO_POINTER(vals_status_code[i].value), sc); + g_hash_table_insert(sc->sp->hash_responses, GUINT_TO_POINTER(vals_http_status_code[i].value), sc); } sp->hash_requests = g_hash_table_new(g_str_hash, g_str_equal); } |