<commit_before>/*
 * root.c
 * Function to handle to the rootservers
 * and to update and prime them
 * (c) 2005 NLnet Labs
 *
 * See the file LICENSE for the license
 *
 */

#include "drill.h"
#include <ldns/dns.h>

/* a global list of the root-servers */
ldns_rr_list *global_dns_root;

/* put a hardcoded list in the root and
 * init the root rrlist structure */
void
init_root(void)
{
	ldns_rr *r;
	
	global_dns_root = ldns_rr_list_new();

	r = ldns_rr_new_frm_str("a.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);

	r = ldns_rr_new_frm_str("b.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);

	r = ldns_rr_new_frm_str("c.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("d.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("e.root-servers.net 3600 IN A 192.168.3.11", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("f.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("g.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("h.root-servers.net 3600 IN A 172.16.58.3", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("i.root-servers.net 3600 IN A 172.16.58.3", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("j.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("k.root-servers.net 3600 IN A 192.168.3.11", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("l.root-servers.net 3600 IN A 192.168.127.12", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	
	r = ldns_rr_new_frm_str("m.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
}<commit_msg>api change the rr is now returned as parameter and ldns_rr_new_frm_str will return  a status mesg<commit_after>/*
 * root.c
 * Function to handle to the rootservers
 * and to update and prime them
 * (c) 2005 NLnet Labs
 *
 * See the file LICENSE for the license
 *
 */

#include "drill.h"
#include <ldns/dns.h>

/* a global list of the root-servers */
ldns_rr_list *global_dns_root;

/* put a hardcoded list in the root and
 * init the root rrlist structure */
void
init_root(void)
{
	ldns_rr *r;
	
	global_dns_root = ldns_rr_list_new();

	ldns_rr_new_frm_str(&r, "a.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "b.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "c.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "d.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "e.root-servers.net 3600 IN A 192.168.3.11", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "f.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "g.root-servers.net 3600 IN A 172.16.31.10", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "h.root-servers.net 3600 IN A 172.16.58.3", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "i.root-servers.net 3600 IN A 172.16.58.3", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "j.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "k.root-servers.net 3600 IN A 192.168.3.11", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "l.root-servers.net 3600 IN A 192.168.127.12", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
	ldns_rr_new_frm_str(&r, "m.root-servers.net 3600 IN A 172.16.17.32", 0, NULL, NULL);
	ldns_rr_list_push_rr(global_dns_root, r);
}
{'fraction_non_alphanumeric': 0.13786008230452676, 'fraction_numerical': 0.0850480109739369, 'mean_word_length': 4.880376344086022, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 26, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6289295', 'n_tokens_mistral': 2328, 'n_tokens_neox': 2040, 'n_words': 413}