浏览代码

LibC: Add IN_MULTICAST to in.h

Peter Ross 3 年之前
父节点
当前提交
54fa06e85c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Libraries/LibC/netinet/in.h

+ 2 - 0
Userland/Libraries/LibC/netinet/in.h

@@ -41,6 +41,8 @@ static inline uint32_t ntohl(uint32_t value)
     return htonl(value);
 }
 
+#define IN_MULTICAST(x) (((x)&0xf0000000) == 0xe0000000)
+
 // NOTE: The IPv6 Addressing Scheme that we detect are documented in RFC# 2373.
 //       See: https://datatracker.ietf.org/doc/html/rfc2373