sd_bus_message_get_errno;
sd_bus_message_get_monotonic_timestamp;
sd_bus_message_get_realtime_timestamp;
+ sd_bus_message_get_seqnum;
sd_bus_message_get_creds;
sd_bus_message_is_signal;
sd_bus_message_is_method_call;
fprintf(f, " Monotonic=%llu", (unsigned long long) m->monotonic);
if (m->realtime != 0)
fprintf(f, " Realtime=%llu", (unsigned long long) m->realtime);
+ if (m->seqnum != 0)
+ fprintf(f, " SequenceNumber=%llu", (unsigned long long) m->seqnum);
- if (m->monotonic != 0 || m->realtime != 0)
+ if (m->monotonic != 0 || m->realtime != 0 || m->seqnum != 0)
fputs("\n", f);
bus_creds_dump(&m->creds, f);
case KDBUS_ITEM_TIMESTAMP:
m->realtime = d->timestamp.realtime_ns / NSEC_PER_USEC;
m->monotonic = d->timestamp.monotonic_ns / NSEC_PER_USEC;
+ m->seqnum = d->timestamp.seqnum;
break;
case KDBUS_ITEM_PID_COMM:
return 0;
}
+_public_ int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t *seqnum) {
+ assert_return(m, -EINVAL);
+ assert_return(seqnum, -EINVAL);
+ assert_return(m->seqnum > 0, -ENODATA);
+
+ *seqnum = m->seqnum;
+ return 0;
+}
+
_public_ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m) {
assert_return(m, NULL);
usec_t monotonic;
usec_t realtime;
+ uint64_t seqnum;
bool sealed:1;
bool dont_send:1;
int sd_bus_message_get_monotonic_timestamp(sd_bus_message *m, uint64_t *usec);
int sd_bus_message_get_realtime_timestamp(sd_bus_message *m, uint64_t *usec);
+int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t* seqnum);
+
sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the result */
int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, const char *member);