func: struct xt_table *arpt_register_table(struct net const struct xt_table const struct arpt_replace *repl) int ret ; struct xt_table_info * newinfo ; void * loc_cpu_entry ; newinfo = xt_alloc_table_info ( repl -> size ); if ( ! newinfo )  loc_cpu_entry = newinfo -> entries; memcpy ( loc_cpu_entry , repl -> entries , repl -> size ); ret = translate_table ( newinfo , loc_cpu_entry , repl ); static int translate_table(struct xt_table_info *newinfo, void const struct arpt_replace *repl) struct arpt_entry * iter ; unsigned int i ; newinfo -> size = repl -> size; newinfo -> number = repl -> num_entries; for (i = 0; i < NF_ARP_NUMHOOKS; i++) newinfo -> hook_entry [ i ] = 0xFFFFFFFF; newinfo -> underflow [ i ] = 0xFFFFFFFF; i = 0; ret = check_entry_size_and_hooks ( iter , newinfo , entry0 , entry0 + repl -> size , repl -> hook_entry , repl -> underflow , repl -> valid_hooks ); static inline int check_entry_size_and_hooks(struct arpt_entry struct xt_table_info const unsigned char const unsigned char const unsigned int const unsigned int unsigned int valid_hooks) unsigned int h ; return - EINVAL ; if ( e -> next_offset < sizeof ( struct arpt_entry ) + sizeof ( struct xt_entry_target ) )  return - EINVAL ; for (h = 0; h < NF_ARP_NUMHOOKS; h++) if ( ! ( valid_hooks & ( 1 << h ) ) )  if ( ( unsigned char * ) e - base == hook_entries [ h ] )  newinfo -> hook_entry [ h ] = hook_entries [ h ]; if ( ( unsigned char * ) e - base == underflows [ h ] )  if ( ! check_underflow ( e ) )  static bool check_underflow(const struct arpt_entry *e) const struct xt_entry_target * t ; unsigned int verdict ; if ( ! unconditional ( & e -> arp ) )  static inline bool unconditional(const struct arpt_arp *arp) static const struct arpt_arp uncond ; return memcmp ( arp , & uncond , sizeof ( uncond ) ) == 0 ; return false ; t = arpt_get_target_c ( e ); static inline const struct xt_entry_target arpt_get_target_c(const struct arpt_entry *e) return arpt_get_target ( ( struct arpt_entry * ) e ) ; if ( strcmp ( t -> u . user . name , XT_STANDARD_TARGET ) != 0 )  return false ; verdict = ( ( struct xt_standard_target * ) t ) -> verdict; verdict = - verdict - 1; return verdict == NF_DROP || verdict == NF_ACCEPT ; return - EINVAL ; newinfo -> underflow [ h ] = underflows [ h ]; return 0 ; if ( ret != 0 )  if ( i != repl -> num_entries )  for (i = 0; i < NF_ARP_NUMHOOKS; i++) if ( ! ( repl -> valid_hooks & ( 1 << i ) ) )  if ( newinfo -> hook_entry [ i ] == 0xFFFFFFFF )  if ( newinfo -> underflow [ i ] == 0xFFFFFFFF )  if ( ! mark_source_chains ( newinfo , repl -> valid_hooks , entry0 ) )  static int mark_source_chains(const struct xt_table_info unsigned int valid_hooks, void *entry0) unsigned int hook ; for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) unsigned int pos = newinfo -> hook_entry [ hook ] ; struct arpt_entry * e = ( struct arpt_entry * ) ( entry0 + pos ) ; if ( ! ( valid_hooks & ( 1 << hook ) ) )  e -> counters . pcnt = pos; const struct xt_standard_target * t = ( void * ) arpt_get_target_c ( e ) ; static inline const struct xt_entry_target arpt_get_target_c(const struct arpt_entry *e) return arpt_get_target ( ( struct arpt_entry * ) e ) ; int visited = e -> comefrom & ( 1 << hook ) ; if ( e -> comefrom & ( 1 << NF_ARP_NUMHOOKS ) )  e -> comefrom |= ( ( 1 << hook ) | ( 1 << NF_ARP_NUMHOOKS ) ); if ( ( e -> target_offset == sizeof ( struct arpt_entry ) && ( strcmp ( t -> target . u . user . name , XT_STANDARD_TARGET ) == 0 ) && t -> verdict < 0 && unconditional ( & e -> arp ) ) || visited )  static inline bool unconditional(const struct arpt_arp *arp) static const struct arpt_arp uncond ; return memcmp ( arp , & uncond , sizeof ( uncond ) ) == 0 ; unsigned int oldpos , size ; if ( ( strcmp ( t -> target . u . user . name , XT_STANDARD_TARGET ) == 0 ) && t -> verdict < - NF_MAX_VERDICT - 1 )  e -> comefrom ^= ( 1 << NF_ARP_NUMHOOKS ); oldpos = pos; pos = e -> counters . pcnt; e -> counters . pcnt = 0; if ( pos == oldpos )  e = ( struct arpt_entry * ) ( entry0 + pos ); while ( oldpos == pos + e -> next_offset )  size = e -> next_offset; e = ( struct arpt_entry * ) ( entry0 + pos + size ); e -> counters . pcnt = pos; pos += size; int newpos = t -> verdict ; if ( strcmp ( t -> target . u . user . name , XT_STANDARD_TARGET ) == 0 && newpos >= 0 )  if ( newpos > newinfo -> size - sizeof ( struct arpt_entry ) )  newpos = pos + e -> next_offset; e = ( struct arpt_entry * ) ( entry0 + newpos ); e -> counters . pcnt = pos; pos = newpos; 