diff options
author | Pavel Tikhomirov <ptikhomirov@virtuozzo.com> | 2021-10-28 18:10:14 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2022-04-29 03:53:52 +0300 |
commit | 26db7adbbbb14fd88e1472ba3d15ee580813e68e (patch) | |
tree | e5c90298544d92d89cdb3b1d461dfcb9fea8069f /soccr | |
parent | 2064793225b28900deb87d03973c824d6721263c (diff) |
clang-format: do automatic comment fixups
Result of `make indent` after enabling AlignTrailingComments.
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Diffstat (limited to 'soccr')
-rw-r--r-- | soccr/soccr.c | 66 | ||||
-rw-r--r-- | soccr/soccr.h | 6 |
2 files changed, 36 insertions, 36 deletions
diff --git a/soccr/soccr.c b/soccr/soccr.c index f6fb1946b..8be2d28e1 100644 --- a/soccr/soccr.c +++ b/soccr/soccr.c @@ -609,8 +609,8 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, unsig libnet_type = LIBNET_RAW4; l = libnet_init(libnet_type, /* injection type */ - NULL, /* network interface */ - errbuf); /* errbuf */ + NULL, /* network interface */ + errbuf); /* errbuf */ if (l == NULL) { loge("libnet_init failed (%s)\n", errbuf); return -1; @@ -623,17 +623,17 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, unsig ret = libnet_build_tcp(ntohs(sk->dst_addr->v4.sin_port), /* source port */ ntohs(sk->src_addr->v4.sin_port), /* destination port */ - data->inq_seq, /* sequence number */ - data->outq_seq - data->outq_len, /* acknowledgement num */ - flags, /* control flags */ - data->rcv_wnd, /* window size */ - 0, /* checksum */ - 10, /* urgent pointer */ - LIBNET_TCP_H + 20, /* TCP packet size */ - NULL, /* payload */ - 0, /* payload size */ - l, /* libnet handle */ - 0); /* libnet id */ + data->inq_seq, /* sequence number */ + data->outq_seq - data->outq_len, /* acknowledgement num */ + flags, /* control flags */ + data->rcv_wnd, /* window size */ + 0, /* checksum */ + 10, /* urgent pointer */ + LIBNET_TCP_H + 20, /* TCP packet size */ + NULL, /* payload */ + 0, /* payload size */ + l, /* libnet handle */ + 0); /* libnet id */ if (ret == -1) { loge("Can't build TCP header: %s\n", libnet_geterror(l)); goto err; @@ -646,28 +646,28 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, unsig memcpy(&src, &sk->src_addr->v6.sin6_addr, sizeof(src)); ret = libnet_build_ipv6(0, 0, LIBNET_TCP_H, /* length */ - IPPROTO_TCP, /* protocol */ - 64, /* hop limit */ - dst, /* source IP */ - src, /* destination IP */ - NULL, /* payload */ - 0, /* payload size */ - l, /* libnet handle */ - 0); /* libnet id */ + IPPROTO_TCP, /* protocol */ + 64, /* hop limit */ + dst, /* source IP */ + src, /* destination IP */ + NULL, /* payload */ + 0, /* payload size */ + l, /* libnet handle */ + 0); /* libnet id */ } else if (family == AF_INET) ret = libnet_build_ipv4(LIBNET_IPV4_H + LIBNET_TCP_H + 20, /* length */ - 0, /* TOS */ - 242, /* IP ID */ - 0, /* IP Frag */ - 64, /* TTL */ - IPPROTO_TCP, /* protocol */ - 0, /* checksum */ - dst_v4, /* source IP */ - src_v4, /* destination IP */ - NULL, /* payload */ - 0, /* payload size */ - l, /* libnet handle */ - 0); /* libnet id */ + 0, /* TOS */ + 242, /* IP ID */ + 0, /* IP Frag */ + 64, /* TTL */ + IPPROTO_TCP, /* protocol */ + 0, /* checksum */ + dst_v4, /* source IP */ + src_v4, /* destination IP */ + NULL, /* payload */ + 0, /* payload size */ + l, /* libnet handle */ + 0); /* libnet id */ else { loge("Unknown socket family\n"); goto err; diff --git a/soccr/soccr.h b/soccr/soccr.h index 934d43827..e7091e591 100644 --- a/soccr/soccr.h +++ b/soccr/soccr.h @@ -1,9 +1,9 @@ #ifndef __LIBSOCCR_H__ #define __LIBSOCCR_H__ -#include <netinet/in.h> /* sockaddr_in, sockaddr_in6 */ +#include <netinet/in.h> /* sockaddr_in, sockaddr_in6 */ #include <netinet/tcp.h> /* TCP_REPAIR_WINDOW, TCP_TIMESTAMP */ -#include <stdint.h> /* uint32_t */ -#include <sys/socket.h> /* sockaddr */ +#include <stdint.h> /* uint32_t */ +#include <sys/socket.h> /* sockaddr */ #include "common/config.h" |