source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/inetdevice.h @ 8

Last change on this file since 8 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 355 bytes
Line 
1#ifndef _LINUX_INETDEVICE_H
2#define _LINUX_INETDEVICE_H
3
4#include <asm/types.h>
5
6static __inline__ __u32 inet_make_mask(int logmask)
7{
8        if (logmask)
9                return htonl(~((1<<(32-logmask))-1));
10        return 0;
11}
12
13static __inline__ int inet_mask_len(__u32 mask)
14{
15        if (!(mask = ntohl(mask)))
16                return 0;
17        return 32 - ffz(~mask);
18}
19
20
21#endif /* _LINUX_INETDEVICE_H */
Note: See TracBrowser for help on using the repository browser.