#include #include #include #include #include #include #include #include #include #include "str.h" #include "tstamping.h" #ifdef __WITH_HARDWARE_TIMESTAMPING int set_sockopt_hwtimestamp(int sock, const char *dev) { int timesource, ret; struct hwtstamp_config hwconfig; struct ifreq ifr; if (!strncmp("any", dev, strlen("any"))) return -1; memset(&hwconfig, 0, sizeof(hwconfig)); hwconfig.tx_type = HWTSTAMP_TX_OFF; hwconfig.rx_filter = HWTSTAMP_FILTER_ALL; memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name)); ifr.ifr_data = &hwconfig; ret = ioctl(sock, SIOCSHWTSTAMP, &ifr); if (ret < 0) return -1; timesource = SOF_TIMESTAMPING_RAW_HARDWARE; return setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, ×ource, sizeof(timesource)); } #else int set_sockopt_hwtimestamp(int sock, const char *dev) { return -1; } #endif ='emaclite-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
uthor
AgeCommit message (Expand)AuthorFilesLines
FilesLines
2017-02-07tcp: replace dst_confirm with sk_dst_confirmJulian Anastasov1-0/+2
2017-02-03tcp: clear pfmemalloc on outgoing skbEric Dumazet1-0/+7
2017-02-03tcp: add tcp_mss_clamp() helperEric Dumazet1-10/+4
2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+4
2017-02-01tcp: fix 0 divide in __tcp_select_window()Eric Dumazet1-2/+4