X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.c;h=1396cd9bbe846559ee345f6488fdd3808ac84ae1;hb=f73fabfda365d22e7dd180fb1614e37c446fbd9e;hp=8ade0830d73da3a51636554fa3be6a57253e3df9;hpb=95ba0f2fffd50c6d52e028cbb72ab1fcd43db876;p=lttng-tools.git diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 8ade0830d..1396cd9bb 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -187,3 +187,16 @@ int kernctl_put_subbuf(int fd) { return ioctl(fd, RING_BUFFER_PUT_SUBBUF); } + +/* Set the stream_id */ +int kernctl_set_stream_id(int fd, unsigned long *stream_id) +{ + return ioctl(fd, RING_BUFFER_SET_STREAM_ID, stream_id); +} + +/* Get the offset of the stream_id in the packet header */ +int kernctl_get_net_stream_id_offset(int fd, unsigned long *offset) +{ + return ioctl(fd, LTTNG_KERNEL_STREAM_ID_OFFSET, offset); + +}