func: const gchar proto_custom_set(proto_tree* tree, GSList *field_ids, gint gchar *result, gchar *expr, const int size) guint32 number ; guint8 * bytes ; int len , prev_len = 0 , last , i , offset_r = 0 , offset_e = 0 ; GPtrArray * finfos ; header_field_info * hfinfo ; char * tmpbuf , * str ; int * field_idx ; int ii = 0 ; while ( field_idx = ( int * ) g_slist_nth_data ( field_ids , ii ++ ) )  if ( ! hfinfo )  while ( hfinfo )  finfos = proto_get_finfo_ptr_array ( tree , hfinfo -> id ); GPtrArray proto_get_finfo_ptr_array(const proto_tree *tree, const int id) if ( ! tree )  return NULL ; if ( PTREE_DATA ( tree ) -> interesting_hfids != NULL )  return ( GPtrArray * ) g_hash_table_lookup ( PTREE_DATA ( tree ) -> interesting_hfids , GINT_TO_POINTER ( id ) ) ; return NULL ; if ( ! finfos || ! ( len = g_ptr_array_len ( finfos ) ) )  if ( occurrence < 0 )  hfinfo = hfinfo -> same_name_next; hfinfo = hfinfo_same_name_get_prev ( hfinfo ); static header_field_info hfinfo_same_name_get_prev(const header_field_info *hfinfo) header_field_info * dup_hfinfo ; if ( hfinfo -> same_name_prev_id == - 1 )  return NULL ; return dup_hfinfo ; if ( ( ( occurrence - prev_len ) > len ) || ( ( occurrence + prev_len ) < - len ) )  if ( occurrence < 0 )  hfinfo = hfinfo -> same_name_next; hfinfo = hfinfo_same_name_get_prev ( hfinfo ); static header_field_info hfinfo_same_name_get_prev(const header_field_info *hfinfo) header_field_info * dup_hfinfo ; if ( hfinfo -> same_name_prev_id == - 1 )  return NULL ; return dup_hfinfo ; prev_len += len; if ( occurrence < 0 )  i = occurrence + len + prev_len; last = i; if ( occurrence > 0 )  i = occurrence - 1 - prev_len; last = i; i = 0; last = len - 1; prev_len += len; while ( i <= last )  finfo = ( field_info * ) g_ptr_array_index ( finfos , i ); if ( offset_e && ( offset_e < ( size - 2 ) ) )  expr [ offset_e ++ ] = ','; switch ( hfinfo -> type )  number = fvalue_get_uinteger ( & finfo -> value ); offset_e += protoo_strlcpy ( expr + offset_e , number ? "1" : "0" , size - offset_e ); static protoo_strlcpy(gchar *dest, const gchar *src, gsize dest_size) gsize res = g_strlcpy ( dest , src , dest_size ) ; if ( res > dest_size )  res = dest_size; return ( int ) res ; g_snprintf ( expr + offset_e , size - offset_e , "\"%s\"" , hf_str_val ); g_strlcpy ( expr + offset_e , number_out , size - offset_e ); offset_e = ( int ) strlen ( expr ); g_snprintf ( expr + offset_e , size - offset_e , "\"%s\"" , hf_str_val ); g_strlcpy ( expr + offset_e , number_out , size - offset_e ); offset_e = ( int ) strlen ( expr ); bytes = ( guint8 * ) fvalue_get ( & finfo -> value ); str = rel_oid_resolved_from_encoded ( NULL , bytes , fvalue_length ( & finfo -> value ) ); str = rel_oid_encoded2string ( NULL , bytes , fvalue_length ( & finfo -> value ) ); offset_e += protoo_strlcpy ( expr + offset_e , str , size - offset_e ); static protoo_strlcpy(gchar *dest, const gchar *src, gsize dest_size) gsize res = g_strlcpy ( dest , src , dest_size ) ; if ( res > dest_size )  res = dest_size; return ( int ) res ; bytes = ( guint8 * ) fvalue_get ( & finfo -> value ); str = oid_resolved_from_encoded ( NULL , bytes , fvalue_length ( & finfo -> value ) ); str = oid_encoded2string ( NULL , bytes , fvalue_length ( & finfo -> value ) ); offset_e += protoo_strlcpy ( expr + offset_e , str , size - offset_e ); static protoo_strlcpy(gchar *dest, const gchar *src, gsize dest_size) gsize res = g_strlcpy ( dest , src , dest_size ) ; if ( res > dest_size )  res = dest_size; return ( int ) res ; bytes = ( guint8 * ) fvalue_get ( & finfo -> value ); str = print_system_id ( NULL , bytes , fvalue_length ( & finfo -> value ) ); offset_e += protoo_strlcpy ( expr + offset_e , str , size - offset_e ); static protoo_strlcpy(gchar *dest, const gchar *src, gsize dest_size) gsize res = g_strlcpy ( dest , src , dest_size ) ; if ( res > dest_size )  res = dest_size; return ( int ) res ; i ++; if ( occurrence == 0 )  hfinfo = hfinfo_same_name_get_prev ( hfinfo ); static header_field_info hfinfo_same_name_get_prev(const header_field_info *hfinfo) if ( hfinfo -> same_name_prev_id == - 1 )  PROTO_REGISTRAR_GET_NTH ( hfinfo -> same_name_prev_id , dup_hfinfo ); hfinfo = NULL; 