`
langzhe
  • 浏览: 278158 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

inet_db 存储ip host别名

 
阅读更多

22 %% Store info about ip addresses, names, aliases host files resolver

 23 %% options


  82 -record(state, 
  83         {db,                %% resolver data
  84          cache,             %% bag of resource records
  85          hosts_byname,      %% hosts table
  86          hosts_byaddr,      %% hosts table
  87          hosts_file_byname, %% hosts table from system file
  88          hosts_file_byaddr, %% hosts table from system file
  89          cache_timer        %% timer reference for refresh
  90         }).

%% Reconstruct an inetrc sturcture from inet_db
 311 get_rc() -> 
 312     get_rc([hosts, domain, nameservers, search, alt_nameservers,
 313             timeout, retry, inet6, usevc,
 314             edns, udp_payload_size, resolv_conf, hosts_file,
 315             socks5_server,  socks5_port, socks5_methods, socks5_noproxy,
 316             udp, sctp, tcp, host, cache_size, cache_refresh, lookup], []).   


2> inet_db:get_rc().
[{nameservers,{202,106,0,20}},
 {resolv_conf,"/etc/resolv.conf"},
 {hosts_file,"/etc/hosts"},
 {lookup,[native]}]

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics