merge from open-source master

Change-Id: I895b74454b35da7eba6c0f6250fe2ca6c9907f1d
This commit is contained in:
The Android Open Source Project 2010-07-02 11:40:01 -07:00
commit 424d027b6e
2 changed files with 10 additions and 0 deletions

View file

@ -173,6 +173,15 @@ struct ip6t_get_entries
#define IP6T_ERROR_TARGET XT_ERROR_TARGET
static __inline__ struct ip6t_entry_target *
ip6t_get_target(struct ip6t_entry *e)
{
return (void *)e + e->target_offset;
}
#define IP6T_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry_match *__m; for (__i = sizeof(struct ip6t_entry); __i < (e)->target_offset; __i += __m->u.match_size) { __m = (void *)(e) + __i; __ret = fn(__m , ## args); if (__ret != 0) break; } __ret; })
#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry *__e; for (__i = 0; __i < (size); __i += __e->next_offset) { __e = (void *)(entries) + __i; __ret = fn(__e , ## args); if (__ret != 0) break; } __ret; })
#endif

View file

@ -71,6 +71,7 @@ kernel_known_generic_statics = set(
"__cmsg_nxthdr", # linux/socket.h
"cmsg_nxthdr", # linux/socket.h
"ipt_get_target",
"ip6t_get_target",
]
)