Browse code

core/ip_addr: Convert SND_F_ flags to enum

Easier to recognize the correct flags in the forest of flags.

Alex Hermann authored on 09/06/2020 07:16:16
Showing 1 changed files
... ...
@@ -134,9 +134,11 @@ typedef struct socket_info {
134 134
 
135 135
 
136 136
 /* send flags */
137
-#define SND_F_FORCE_CON_REUSE	1 /* reuse an existing connection or fail */
138
-#define SND_F_CON_CLOSE			2 /* close the connection after sending */
139
-#define SND_F_FORCE_SOCKET		4 /* send socket in dst is forced */
137
+enum send_flags {
138
+	SND_F_FORCE_CON_REUSE   = (1 << 0), /* reuse an existing connection or fail */
139
+	SND_F_CON_CLOSE         = (1 << 1), /* close the connection after sending */
140
+	SND_F_FORCE_SOCKET      = (1 << 2), /* send socket in dst is forced */
141
+};
140 142
 
141 143
 typedef struct snd_flags {
142 144
 	unsigned short f;          /* snd flags */