Skip to content

Commit

Permalink
core/ip_addr: Convert SND_F_ flags to enum
Browse files Browse the repository at this point in the history
Easier to recognize the correct flags in the forest of flags.
  • Loading branch information
gaaf authored and henningw committed Oct 20, 2020
1 parent b2aa704 commit d09098c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/ip_addr.h
Expand Up @@ -134,9 +134,11 @@ typedef struct socket_info {


/* send flags */
#define SND_F_FORCE_CON_REUSE 1 /* reuse an existing connection or fail */
#define SND_F_CON_CLOSE 2 /* close the connection after sending */
#define SND_F_FORCE_SOCKET 4 /* send socket in dst is forced */
enum send_flags {
SND_F_FORCE_CON_REUSE = (1 << 0), /* reuse an existing connection or fail */
SND_F_CON_CLOSE = (1 << 1), /* close the connection after sending */
SND_F_FORCE_SOCKET = (1 << 2), /* send socket in dst is forced */
};

typedef struct snd_flags {
unsigned short f; /* snd flags */
Expand Down

0 comments on commit d09098c

Please sign in to comment.