Changeset 752709f for lib/libtrace.h


Ignore:
Timestamp:
03/17/06 10:58:25 (16 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
85a0d42
Parents:
548da5c
Message:

Add libtrace_ether_{n,a}to{a,n}
Fix bug with get seconds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r7ac9705 r752709f  
    932932/*@}*/
    933933
     934/** @name Portability
     935 * This section has functions that causes annoyances to portability for one
     936 * reason or another.
     937 * @{
     938 */
     939
     940/** Convert an ethernet address to a string
     941 * @param addr  Ethernet address in network byte order
     942 * @param buf   Buffer to store the ascii representation, or NULL
     943 * @return buf, or if buf is NULL then a statically allocated buffer.
     944 *
     945 * This function is similar to the GNU ether_ntoa_r function, with a few
     946 * minor differences.  if NULL is passed as buf, then the function will
     947 * use an internal static buffer, if NULL isn't passed then the function
     948 * will use that buffer instead.
     949 *
     950 * @note the type of addr isn't struct ether_addr as it is with ether_ntoa_r,
     951 * however it is bit compatible so that a cast will work.
     952 */
     953char *trace_ether_ntoa(const uint8_t *addr, char *buf);
     954
     955/** Convert a string to an ethernet address
     956 * @param buf   Ethernet address in hex format delimited with :'s.
     957 * @param addr  buffer to store the binary representation, or NULL
     958 * @return addr, or if addr is NULL, then a statically allocated buffer.
     959 *
     960 * This function is similar to the GNU ether_aton_r function, with a few
     961 * minor differences.  if NULL is passed as addr, then the function will
     962 * use an internal static buffer, if NULL isn't passed then the function will
     963 * use that buffer instead.
     964 *
     965 * @note the type of addr isn't struct ether_addr as it is with ether_aton_r,
     966 * however it is bit compatible so that a cast will work.
     967 */
     968uint8_t *trace_ether_aton(const char *buf, uint8_t *addr);
     969
     970/*@}*/
     971
     972
    934973/** Which port is the server port */
    935974typedef enum {
Note: See TracChangeset for help on using the changeset viewer.