AUPARSE_GET_TIMESTAMP(3)

πŸ“¦
version 4.2.1 Β· 3 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

✨ AUPARSE_GET_TIMESTAMP(3) ✨

okay bestie, welcome to the Linux Audit API corner of the manual, section 3 πŸŽ€ this one's about grabbing the timestamp of an event, and it's honestly so simple it's giving main character energy πŸ’…


🌸 NAME 🌸

auparse_get_timestamp β€” access timestamp of the event πŸ•βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <auparse.h>

const au_event_t * auparse_get_timestamp(const auparse_state_t *au);

(yeah, the original page has a stray " at the end of that line, and we're keeping it, no notes πŸ™ˆ)


πŸ’– DESCRIPTION πŸ’–

so like. auparse_get_timestamp is an accessor function for the event's timestamp data structure. that's it. that's the whole job. you hand it your state, it hands you back the goods πŸ‘‘

the data structure it points you at looks like this, literally:

typedef struct
{
        time_t sec;             // Event seconds
        unsigned int milli;     // millisecond of the timestamp
        unsigned long serial;   // Serial number of the event
        const char *host;       // Machine's node name
} au_event_t;

look at her. four lil fields. sec is the event seconds, milli is the millisecond of the timestamp, serial is the serial number of the event, and host is the machine's node name. obsessed 🌈


πŸ”₯ RETURN VALUE πŸ”₯

it returns NULL if an error occurs 😭 β€” otherwise you get a valid pointer to the data, which is the slay outcome fr fr ✨


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Steve Grubb β€” king behavior, we love to see it 🫢


and that's the whole page, bestie!! this lil icon was brought to you by Red Hat, dated Sept 2007, and it lives at AUPARSE_GET_TIMESTAMP(3) πŸ’– go get those timestamps, you absolute legend 🌟