Module: kamailio
Branch: master
Commit: b2aa704dab80d1683e34346ce2354b74dd306aff
URL:
https://github.com/kamailio/kamailio/commit/b2aa704dab80d1683e34346ce2354b7…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-10-20T12:17:10+02:00
core/ip_addr: Reformat and redefine si_flags as bitshifts
Make it a bit easier to read
---
Modified: src/core/ip_addr.h
---
Diff:
https://github.com/kamailio/kamailio/commit/b2aa704dab80d1683e34346ce2354b7…
Patch:
https://github.com/kamailio/kamailio/commit/b2aa704dab80d1683e34346ce2354b7…
---
diff --git a/src/core/ip_addr.h b/src/core/ip_addr.h
index 2b67c214ec..b366586ca9 100644
--- a/src/core/ip_addr.h
+++ b/src/core/ip_addr.h
@@ -77,8 +77,14 @@ union sockaddr_union{
};
-enum si_flags { SI_NONE=0, SI_IS_IP=1, SI_IS_LO=2, SI_IS_MCAST=4,
- SI_IS_ANY=8, SI_IS_MHOMED=16 };
+enum si_flags {
+ SI_NONE = 0,
+ SI_IS_IP = (1<<0),
+ SI_IS_LO = (1<<1),
+ SI_IS_MCAST = (1<<2),
+ SI_IS_ANY = (1<<3),
+ SI_IS_MHOMED = (1<<4),
+};
typedef struct addr_info {
str name; /* name - eg.: foo.bar or 10.0.0.1 */