www.pudn.com > hipl.1.0.1.rar > doxygen.h


#ifndef _DOXYGEN_H
#define _DOXYGEN_H
/** @file
 * There should be no need to include this file anywhere!
 * This is only for defining doxygen related things, such as
 * groups and lists.
 */
 
/**
 * Error handling macros used for checking errors. To use these macros, define a
 * label named @c out_err at the end of the function. For example, memory
 * allocation/deallocation procedure is as follows:
 * 
 * int f() {
 *     char *mem = NULL;
 *     HIP_IFEL(!(mem = HIP_ALLOC(256, 0)), -1, "alloc\n");
 * 
 *   out_err:
 *     if (mem != NULL) {
 *       free(mem);
 *     }
 *     return err;
 * }
 * 
* All functions should return an error value instead of "ok" value. That, is * zero for success and non-zero for failure. Error values are defined in * /usr/include/asm-generic/errno-base.h and /usr/include/asm-generic/errno.h * as follows: * *
 * EPERM            1       Operation not permitted 
 * ENOENT           2       No such file or directory 
 * ESRCH            3       No such process 
 * EINTR            4       Interrupted system call 
 * EIO              5       I/O error 
 * ENXIO            6       No such device or address 
 * E2BIG            7       Argument list too long 
 * ENOEXEC          8       Exec format error 
 * EBADF            9       Bad file number 
 * ECHILD          10       No child processes 
 * EAGAIN          11       Try again 
 * ENOMEM          12       Out of memory 
 * EACCES          13       Permission denied 
 * EFAULT          14       Bad address 
 * ENOTBLK         15       Block device required 
 * EBUSY           16       Device or resource busy 
 * EEXIST          17       File exists 
 * EXDEV           18       Cross-device link 
 * ENODEV          19       No such device 
 * ENOTDIR         20       Not a directory 
 * EISDIR          21       Is a directory 
 * EINVAL          22       Invalid argument 
 * ENFILE          23       File table overflow 
 * EMFILE          24       Too many open files 
 * ENOTTY          25       Not a typewriter 
 * ETXTBSY         26       Text file busy 
 * EFBIG           27       File too large 
 * ENOSPC          28       No space left on device 
 * ESPIPE          29       Illegal seek 
 * EROFS           30       Read-only file system 
 * EMLINK          31       Too many links 
 * EPIPE           32       Broken pipe 
 * EDOM            33       Math argument out of domain of func 
 * ERANGE          34       Math result not representable 
 * EDEADLK         35       Resource deadlock would occur
 * ENAMETOOLONG    36       File name too long
 * ENOLCK          37       No record locks available
 * ENOSYS          38       Function not implemented
 * ENOTEMPTY       39       Directory not empty
 * ELOOP           40       Too many symbolic links encountered
 * EWOULDBLOCK     EAGAIN   Operation would block
 * ENOMSG          42       No message of desired type
 * EIDRM           43       Identifier removed
 * ECHRNG          44       Channel number out of range
 * EL2NSYNC        45       Level 2 not synchronized
 * EL3HLT          46       Level 3 halted
 * EL3RST          47       Level 3 reset
 * ELNRNG          48       Link number out of range
 * EUNATCH         49       Protocol driver not attached
 * ENOCSI          50       No CSI structure available
 * EL2HLT          51       Level 2 halted
 * EBADE           52       Invalid exchange
 * EBADR           53       Invalid request descriptor
 * EXFULL          54       Exchange full
 * ENOANO          55       No anode
 * EBADRQC         56       Invalid request code
 * EBADSLT         57       Invalid slot
 * EDEADLOCK       EDEADLK
 * EBFONT          59       Bad font file format
 * ENOSTR          60       Device not a stream
 * ENODATA         61       No data available
 * ETIME           62       Timer expired
 * ENOSR           63       Out of streams resources
 * ENONET          64       Machine is not on the network
 * ENOPKG          65       Package not installed
 * EREMOTE         66       Object is remote
 * ENOLINK         67       Link has been severed
 * EADV            68       Advertise error
 * ESRMNT          69       Srmount error
 * ECOMM           70       Communication error on send
 * EPROTO          71       Protocol error
 * EMULTIHOP       72       Multihop attempted
 * EDOTDOT         73       RFS specific error
 * EBADMSG         74       Not a data message
 * EOVERFLOW       75       Value too large for defined data type
 * ENOTUNIQ        76       Name not unique on network
 * EBADFD          77       File descriptor in bad state
 * EREMCHG         78       Remote address changed
 * ELIBACC         79       Can not access a needed shared library
 * ELIBBAD         80       Accessing a corrupted shared library
 * ELIBSCN         81       .lib section in a.out corrupted
 * ELIBMAX         82       Attempting to link in too many shared libraries
 * ELIBEXEC        83       Cannot exec a shared library directly
 * EILSEQ          84       Illegal byte sequence
 * ERESTART        85       Interrupted system call should be restarted
 * ESTRPIPE        86       Streams pipe error
 * EUSERS          87       Too many users
 * ENOTSOCK        88       Socket operation on non-socket
 * EDESTADDRREQ    89       Destination address required
 * EMSGSIZE        90       Message too long
 * EPROTOTYPE      91       Protocol wrong type for socket
 * ENOPROTOOPT     92       Protocol not available
 * EPROTONOSUPPORT 93       Protocol not supported
 * ESOCKTNOSUPPORT 94       Socket type not supported
 * EOPNOTSUPP      95       Operation not supported on transport endpoint
 * EPFNOSUPPORT    96       Protocol family not supported
 * EAFNOSUPPORT    97       Address family not supported by protocol
 * EADDRINUSE      98       Address already in use
 * EADDRNOTAVAIL   99       Cannot assign requested address
 * ENETDOWN        100      Network is down
 * ENETUNREACH     101      Network is unreachable
 * ENETRESET       102      Network dropped connection because of reset
 * ECONNABORTED    103      Software caused connection abort
 * ECONNRESET      104      Connection reset by peer
 * ENOBUFS         105      No buffer space available
 * EISCONN         106      Transport endpoint is already connected
 * ENOTCONN        107      Transport endpoint is not connected
 * ESHUTDOWN       108      Cannot send after transport endpoint shutdown
 * ETOOMANYREFS    109      Too many references: cannot splice
 * ETIMEDOUT       110      Connection timed out
 * ECONNREFUSED    111      Connection refused
 * EHOSTDOWN       112      Host is down
 * EHOSTUNREACH    113      No route to host
 * EALREADY        114      Operation already in progress
 * EINPROGRESS     115      Operation now in progress
 * ESTALE          116      Stale NFS file handle
 * EUCLEAN         117      Structure needs cleaning
 * ENOTNAM         118      Not a XENIX named type file
 * ENAVAIL         119      No XENIX semaphores available
 * EISNAM          120      Is a named type file
 * EREMOTEIO       121      Remote I/O error
 * EDQUOT          122      Quota exceeded
 * ENOMEDIUM       123      No medium found
 * EMEDIUMTYPE     124      Wrong medium type
 * ECANCELED       125      Operation Canceled
 * ENOKEY          126      Required key not available
 * EKEYEXPIRED     127      Key has expired
 * EKEYREVOKED     128      Key has been revoked
 * EKEYREJECTED    129      Key was rejected by service
 * EOWNERDEAD      130      Owner died
 * ENOTRECOVERABLE 131      State not recoverable
 * 
* * @defgroup ife Error handling macros **/ /** @defgroup params TODOs for parameters */ /** * @defgroup hip_msg HIP daemon message types * @note DONT MAKE THESE VALUES HIGHER THAN 255. * The variable, which stores this type, is 8 bits. */ /** @defgroup hip_so HIP socket options */ /** @defgroup libhipgui HIP GUI library */ /** @defgroup daemon_states HIP daemon states */ /** @defgroup exec_app_types Execute application types */ /** * Type values used in Host Identity Protocol (HIP) parameters. * * These are the type values used in Host Identity Protocol (HIP) parameters * defined in [draft-ietf-hip-base] and other drafts expanding it. Because the * ordering (from lowest to highest) of HIP parameters is strictly enforced, the * parameter type values for existing parameters have been spaced to allow for * future protocol extensions. * * Type values are grouped as follows: * * * @defgroup hip_param_type_numbers HIP parameter type values * @see hip_tlv * @see hip_param_func * @see * draft-ietf-hip-base-06-pre180506 section 5.2. * @note The order of the parameters is strictly enforced. The parameters * @b must be in order from lowest to highest. */ /** * Type-length-value data structures in Host Identity Protocol (HIP). * * @defgroup hip_tlv HIP TLV data structures * @see hip_param_type_numbers * @see hip_param_func * @see * draft-ietf-hip-base-06-pre180506 section 5.2. * @note The order of the parameters is strictly enforced. The parameters * @b must be in order from lowest to highest. */ /** * HIP host assosiation function pointer data structures. * * Data structures containing function pointers pointing to functions used for * sending, receiving and handling data and modifying host assosiation state. * * @defgroup hadb_func HIP host assosiation function sets */ /** * Functions for receiving HIP control packets. * * These functions are called after a HIP control packet is received by * hip_receive_control_packet()-function and the packet is detected to be a HIP * control packet. The purpose of these functions is to decide whether to * handle the packet at all. This decision is based first and foremost on the * state of the current host association. If the packet is to be handled, all * handling should be done in respective handle-function. * * @defgroup receive_functions HIP receive functions * @see handle_functions */ /** * Functions for handling HIP control packets. * * These functions do the actual handling of the packet. These functions are * called from the corresponding receive functions. * * @defgroup handle_functions HIP handle functions * @see receive_functions */ /** * Functions for creating HIP parameters. * * @defgroup hip_param_func HIP parameter functions * @see hip_param_type_numbers * @see hip_tlv */ /** * HIP NOTIFICATION parameter values. * * NOTIFICATION parameter error types used in the "Notify Message Type"-field of * NOTIFICATION parameter as specified in section 5.2.16. of * draft-ietf-hip-base-06. * * @defgroup notification NOTIFICATION parameter values * @see hip_notification */ /** * @file libhiptool/protodefs.h * @def HIP_NTF_UNSUPPORTED_CRITICAL_PARAMETER_TYPE * Sent if the parameter type has the "critical" bit set and the * parameter type is not recognized. Notification Data contains the two * octet parameter type. * @def HIP_NTF_INVALID_SYNTAX * Indicates that the HIP message received was invalid because * some type, length, or value was out of range or because the * request was rejected for policy reasons. To avoid a denial of * service attack using forged messages, this status may only be * returned for packets whose HMAC (if present) and SIGNATURE have * been verified. This status MUST be sent in response to any * error not covered by one of the other status types, and should * not contain details to avoid leaking information to someone * probing a node. To aid debugging, more detailed error * information SHOULD be written to a console or log. * @def HIP_NTF_NO_DH_PROPOSAL_CHOSEN * None of the proposed group IDs was acceptable. * @def HIP_NTF_INVALID_DH_CHOSEN * The D-H Group ID field does not correspond to one offered * by the Responder. * @def HIP_NTF_NO_HIP_PROPOSAL_CHOSEN * None of the proposed HIP Transform crypto suites was * acceptable. * @def HIP_NTF_INVALID_HIP_TRANSFORM_CHOSEN * The HIP Transform crypto suite does not correspond to * one offered by the Responder. * @def HIP_NTF_AUTHENTICATION_FAILED * Sent in response to a HIP signature failure, except when * the signature verification fails in a NOTIFY message. * @def HIP_NTF_CHECKSUM_FAILED * Sent in response to a HIP checksum failure. * @def HIP_NTF_HMAC_FAILED * Sent in response to a HIP HMAC failure. * @def HIP_NTF_ENCRYPTION_FAILED * The Responder could not successfully decrypt the * ENCRYPTED parameter. * @def HIP_NTF_INVALID_HIT * Sent in response to a failure to validate the peer's * HIT from the corresponding HI. * @def HIP_NTF_BLOCKED_BY_POLICY * The Responder is unwilling to set up an association * for some policy reason (e.g.\ received HIT is NULL * and policy does not allow opportunistic mode). * @def HIP_NTF_SERVER_BUSY_PLEASE_RETRY * The Responder is unwilling to set up an association * as it is suffering under some kind of overload and * has chosen to shed load by rejecting your request. * You may retry if you wish, however you MUST find * another (different) puzzle solution for any such * retries. Note that you may need to obtain a new * puzzle with a new I1/R1 exchange. * @def HIP_NTF_I2_ACKNOWLEDGEMENT * The Responder has received your I2 but had to queue * the I2 for processing. The puzzle was correctly solved * and the Responder is willing to set up an association * but has currently a number of I2s in processing queue. * R2 will be sent after the I2 has been processed. * @def HIP_NTF_RVS_NAT * Sent in response by a Rendezvous Server to a Initiator behind a NAT. * An extension value introduced in draft-schmitt-hip-nat-traversal-03. * In the scenario where a NATted HIP node uses rendezvous service to * contact another HIP node in a publicly addressable network, the * Rendezvous Server replies to the Initiator with a NOTIFY message * having a NOTIFICATION parameter of this type. */ #endif /* _DOXYGEN_H */