Skip to content

Commit

Permalink
naming: socket_tx_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerBea committed Dec 27, 2023
1 parent 4bc47ac commit ce18629
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -3953,7 +3953,7 @@ static bool open_socket_tx(void)
{
static struct sockaddr_ll saddr;
static struct packet_mreq mrq;
static int socket_rx_flags;
static int socket_tx_flags;
static int prioval;
static socklen_t priolen;

Expand All @@ -3972,8 +3972,8 @@ saddr.sll_protocol = htons(ETH_P_ALL);
saddr.sll_halen = ETH_ALEN;
saddr.sll_pkttype = PACKET_OTHERHOST;
if(bind(fd_socket_tx, (struct sockaddr*) &saddr, sizeof(saddr)) < 0) return false;
if((socket_rx_flags = fcntl(fd_socket_rx, F_GETFL, 0)) < 0) return false;
if(fcntl(fd_socket_tx, F_SETFL, socket_rx_flags | O_NONBLOCK) < 0) return false;
if((socket_tx_flags = fcntl(fd_socket_tx, F_GETFL, 0)) < 0) return false;
if(fcntl(fd_socket_tx, F_SETFL, socket_tx_flags | O_NONBLOCK) < 0) return false;
return true;
}
/*---------------------------------------------------------------------------*/
Expand Down

0 comments on commit ce18629

Please sign in to comment.