summaryrefslogtreecommitdiff
path: root/udev/lib
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-17 16:49:27 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-10-17 16:49:27 +0200
commitcb25a9585d87d8dd13d9eae66fd232e3dfdc8fac (patch)
tree386032c94090b61ec2be78c57f7ab68810d84a4c /udev/lib
parentd960ad1546548d4b7aaf35e8b8f2cef652449ee7 (diff)
libudev: monitor - add set_receive_buffer_size()
Diffstat (limited to 'udev/lib')
-rw-r--r--udev/lib/libudev-monitor.c7
-rw-r--r--udev/lib/libudev-private.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c
index d0f28849aa..6c6f4aa7e0 100644
--- a/udev/lib/libudev-monitor.c
+++ b/udev/lib/libudev-monitor.c
@@ -152,6 +152,13 @@ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
return 0;
}
+int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size)
+{
+ if (udev_monitor == NULL)
+ return -1;
+ return setsockopt(udev_monitor->sock, SOL_SOCKET, SO_RCVBUFFORCE, &size, sizeof(size));
+}
+
/**
* udev_monitor_ref:
* @udev_monitor: udev monitor
diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h
index f2814c4ad6..50c96571c5 100644
--- a/udev/lib/libudev-private.h
+++ b/udev/lib/libudev-private.h
@@ -91,6 +91,7 @@ extern int udev_device_rename_db(struct udev_device *udev_device, const char *de
/* libudev-monitor - netlink/unix socket communication */
extern int udev_monitor_send_device(struct udev_monitor *udev_monitor, struct udev_device *udev_device);
+extern int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size);
/* libudev-ctrl - daemon runtime setup */
struct udev_ctrl;