#include <fcntl.h>
#include <net/if.h>
#include <netdb.h>
+#include <netinet/tcp.h>
#include <poll.h>
#include <stddef.h>
#include <stdio.h>
#include "packets.h"
#include "poll-loop.h"
#include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
#ifdef __linux__
#include <linux/if_packet.h>
#endif
}
}
+void
+setsockopt_tcp_nodelay(int fd)
+{
+ int on = 1;
+ int retval;
+
+ retval = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof on);
+ if (retval) {
+ retval = sock_errno();
+ VLOG_ERR("setsockopt(TCP_NODELAY): %s", sock_strerror(retval));
+ }
+}
+
int
set_dscp(int fd, uint8_t dscp)
{