Committer: Tobias Heer <heer@xxxxxxxxxxxxxxxxx> Date: Wed Feb 17 23:41:06 2010 +0100 Revision: 3673 Revision-id: heer@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: Missing doxygen for firewall/midauth.c Modified: D firewall/midauth.c.doxyme M firewall/midauth.c === modified file 'firewall/midauth.c' --- firewall/midauth.c 2010-02-12 17:00:10 +0000 +++ firewall/midauth.c 2010-02-17 22:41:06 +0000 @@ -214,6 +214,13 @@ ctx->ipq_packet->data_len = len; } +/** + * Verify that the challenge response in a packet is valid + * + * @param hip packet that contains the challenge response + * @param s challenge response parameter + * @return 0 on success, <0 otherwise + */ int midauth_verify_challenge_response(struct hip_common *hip, struct hip_challenge_response *s) { @@ -284,6 +291,17 @@ return err; } +/** + * Creates a challenge request and adds it to a forwarded HIP + * packet. + * + * @param ctx connection context of the modified packet + * @param val_K puzzle difficulty + * @param ltime lifetime of the challenge in s + * @param opaque contents of the opaque data field + * @param opaque_len length of the opaque data field + * @return 0 on success, <0 otherwise + */ int midauth_add_challenge_request(hip_fw_context_t *ctx, uint8_t val_K, uint8_t ltime, uint8_t *opaque, @@ -336,6 +354,13 @@ return midauth_handler_drop; } +/** + * Packet handler dispatcher function. Classifies packets based on + * their type and calls the appropriate type-specific handler functions. + * + * @param ctx HIP connection context + * @return the verdict, either NF_ACCEPT or NF_DROP + */ int midauth_filter_hip(hip_fw_context_t *ctx) { int verdict = NF_ACCEPT; @@ -389,6 +414,9 @@ return verdict; } +/** + * Call the initializer functions + */ void midauth_init(void) { pisa_init(&handlers); === removed file 'firewall/midauth.c.doxyme' --- firewall/midauth.c.doxyme 2010-02-11 17:34:50 +0000 +++ firewall/midauth.c.doxyme 1970-01-01 00:00:00 +0000 @@ -1,103 +0,0 @@ -/** - * @file firewall/midauth.c - * - * <LICENSE TEMLPATE LINE - LEAVE THIS LINE INTACT> - * - * Write description of source file here for dOxygen. Be as precise as possible. - * Please also note how and by which parts of the code this file should be used. - * - * @brief Write a short summary - * - * @author <Put all existing author information here> - * @author another Author another@xxxxxxxxxx - */ - - - -/// Single line comment for dOxygen. - -/** - * my_great_function - * - * Write description of function here. - * The function should follow these comments. - * - * Document the use of each function variable and indicate if this - * argument is used to return information to the calling context. Use - * [out] for outut parameters (This is very important). Align the - * descriptions to improve readability. - * - * @note: put important usage informations to notes. - * - * @param firstArg Description of first function argument. - * @param[out] secondArg Description of second function argument. - * @param thirdArg Description of third function argument. - * @return Description of returned value. - */ - -int my_great_function(int firstArg, char **secondArg, int thirdArg) -{ - ..... - -/// Now it's your turn. - - - - -/** - * midauth_add_challenge_request - * - * - * @param ctx - * @param val_K - * @param ltime - * @param opaque - * @param opaque_len - * @return - */ - - -/** - * midauth_filter_hip - * - * - * @param ctx - * @return - */ - - -/** - * midauth_handler_accept - * - * - * @param ctx - * @return - */ - - -/** - * midauth_handler_drop - * - * - * @param ctx - * @return - */ - - -/** - * midauth_init - * - * - * @param void - * @return - */ - - -/** - * midauth_verify_challenge_response - * - * - * @param libopphip - * @param tools - * @return - */