doxygen: add @file declarations for src/core/proto

If a file doesn't use the file command (either \file or @file),
Doxygen won't try to process it.

These declarations also turned up a doxygen warning for
proto_socks.c; I fixed that too.
This commit is contained in:
Nick Mathewson 2019-10-26 11:13:29 -04:00
parent 39d09ea081
commit 4d4a3eeeb1
10 changed files with 53 additions and 8 deletions

View File

@ -4,6 +4,13 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_cell.c
* @brief Decodes Tor cells from buffers.
**/
/* Right now it only handles variable-length cells, but eventually
* we should refactor other cell-reading code into here. */
#include "core/or/or.h"
#include "lib/buf/buffers.h"
#include "core/proto/proto_cell.h"
@ -83,4 +90,3 @@ fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto)
*out = result;
return 1;
}

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_cell.h
* @brief Header for proto_cell.c
**/
#ifndef TOR_PROTO_CELL_H
#define TOR_PROTO_CELL_H
@ -14,4 +19,3 @@ int fetch_var_cell_from_buf(struct buf_t *buf, struct var_cell_t **out,
int linkproto);
#endif /* !defined(TOR_PROTO_CELL_H) */

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_control0.c
* @brief Code to detect the obsolete v0 control protocol.
**/
#include "core/or/or.h"
#include "lib/buf/buffers.h"
#include "core/proto/proto_control0.h"
@ -23,4 +28,3 @@ peek_buf_has_control0_command(buf_t *buf)
}
return 0;
}

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_control0.h
* @brief Header for proto_control0.c
**/
#ifndef TOR_PROTO_CONTROL0_H
#define TOR_PROTO_CONTROL0_H
@ -11,4 +16,3 @@ struct buf_t;
int peek_buf_has_control0_command(struct buf_t *buf);
#endif /* !defined(TOR_PROTO_CONTROL0_H) */

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_ext_or.c
* @brief Parsing/encoding for the extended OR protocol.
**/
#include "core/or/or.h"
#include "lib/buf/buffers.h"
#include "feature/relay/ext_orport.h"
@ -37,4 +42,3 @@ fetch_ext_or_command_from_buf(buf_t *buf, ext_or_cmd_t **out)
buf_get_bytes(buf, (*out)->body, len);
return 1;
}

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_ext_or.h
* @brief Header for proto_ext_or.c
**/
#ifndef TOR_PROTO_EXT_OR_H
#define TOR_PROTO_EXT_OR_H

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_http.c
* @brief Parse a subset of the HTTP protocol.
**/
#define PROTO_HTTP_PRIVATE
#include "core/or/or.h"
#include "lib/buf/buffers.h"
@ -168,4 +173,3 @@ buf_http_find_content_length(const char *headers, size_t headerlen,
return ok ? 1 : -1;
}

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_http.h
* @brief Header for proto_http.c
**/
#ifndef TOR_PROTO_HTTP_H
#define TOR_PROTO_HTTP_H
@ -21,4 +26,3 @@ STATIC int buf_http_find_content_length(const char *headers, size_t headerlen,
#endif
#endif /* !defined(TOR_PROTO_HTTP_H) */

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_socks.c
* @brief Implementations for SOCKS4 and SOCKS5 protocols.
**/
#include "core/or/or.h"
#include "feature/client/addressmap.h"
#include "lib/buf/buffers.h"
@ -105,7 +110,7 @@ socks_request_free_(socks_request_t *req)
/**
* Parse a single SOCKS4 request from buffer <b>raw_data</b> of length
* <b>datalen</b> and update relevant fields of <b>req</b>. If SOCKS4a
* request is detected, set <b>*is_socks4a<b> to true. Set <b>*drain_out</b>
* request is detected, set <b>*is_socks4a</b> to true. Set <b>*drain_out</b>
* to number of bytes we parsed so far.
*
* Return SOCKS_RESULT_DONE if parsing succeeded, SOCKS_RESULT_INVALID if

View File

@ -4,6 +4,11 @@
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file proto_socks.h
* @brief Header for proto_socks.c
**/
#ifndef TOR_PROTO_SOCKS_H
#define TOR_PROTO_SOCKS_H