You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(5) |
Feb
(1) |
Mar
(7) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(6) |
Nov
(4) |
Dec
|
2003 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(5) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(3) |
Nov
(2) |
Dec
|
2004 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(13) |
Dec
|
2006 |
Jan
(3) |
Feb
(3) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(2) |
Apr
(4) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(2) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(13) |
Jun
(7) |
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(3) |
Dec
(1) |
2010 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
(2) |
Oct
|
Nov
(12) |
Dec
(3) |
2011 |
Jan
|
Feb
|
Mar
(7) |
Apr
|
May
(8) |
Jun
(6) |
Jul
|
Aug
|
Sep
(11) |
Oct
(8) |
Nov
(3) |
Dec
(2) |
2012 |
Jan
(9) |
Feb
(3) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(6) |
Apr
|
May
(8) |
Jun
|
Jul
(5) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2018 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
|
May
|
Jun
(2) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
(2) |
2019 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
|
May
(8) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(2) |
2020 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(3) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Adam F. <a...@br...> - 2011-11-23 04:39:04
|
Hi Brian- How do I modify the initial request message to request the DNSSEC extended attributes? Should I be able to get those attributes from a query to say gmail.com -- i.e can I just fire off queries to bunch of the major sites at this point and expect DNSSEC responses? Thanks very much. -Adam On Mon, Oct 31, 2011 at 2:09 PM, Adam Fisk <ada...@gm...> wrote: > Thanks very much, Brian -- this is super useful. I've been trying to > avoid breaking out the RFCs, but it sounds like I've just been in > denial. I'll take the plunge and learn the basics before circling back > and using the building blocks you've graciously provided in dnsjava. > > All the Best, > > -Adam > > > On Mon, Oct 31, 2011 at 11:12 AM, Brian Wellington <bwe...@xb...> wrote: >> >> On Oct 30, 2011, at 3:11 PM, Adam Fisk wrote: >> >>> Can anyone provide a quick example of verifying a DNSSEC response on the >>> client side. I can't seem to find good documentation on how to do this. >> >> There isn't really a such thing as "a DNSSEC response", so I'm not completely sure what you're looking for. DNSSEC signs DNS records, not DNS messages. >> >> A response from a signed zone will (typically) contain one or more RRSIG records, signing the data records, which comprise an RRset. If you have the public key (which won't be in the response), >> then you can call DNSSEC.verify(rrset, rrsig, pubkey). The data and signature RRsets can be obtained from Message.getSectionRRsets() on the response, and the matching signature can be found by comparing the results of getFootprint() on the public key (DNSKEY) and signature (RRSIG). >> >> I don't think it's possible to come up with a quick example of all of this, as it's not trivial. >> >> Brian > > > > -- > Adam Fisk > http://www.littleshoot.org | http://adamfisk.wordpress.com | > http://twitter.com/adamfisk > |
From: Adam F. <ada...@gm...> - 2011-10-31 21:10:01
|
Thanks very much, Brian -- this is super useful. I've been trying to avoid breaking out the RFCs, but it sounds like I've just been in denial. I'll take the plunge and learn the basics before circling back and using the building blocks you've graciously provided in dnsjava. All the Best, -Adam On Mon, Oct 31, 2011 at 11:12 AM, Brian Wellington <bwe...@xb...> wrote: > > On Oct 30, 2011, at 3:11 PM, Adam Fisk wrote: > >> Can anyone provide a quick example of verifying a DNSSEC response on the >> client side. I can't seem to find good documentation on how to do this. > > There isn't really a such thing as "a DNSSEC response", so I'm not completely sure what you're looking for. DNSSEC signs DNS records, not DNS messages. > > A response from a signed zone will (typically) contain one or more RRSIG records, signing the data records, which comprise an RRset. If you have the public key (which won't be in the response), > then you can call DNSSEC.verify(rrset, rrsig, pubkey). The data and signature RRsets can be obtained from Message.getSectionRRsets() on the response, and the matching signature can be found by comparing the results of getFootprint() on the public key (DNSKEY) and signature (RRSIG). > > I don't think it's possible to come up with a quick example of all of this, as it's not trivial. > > Brian -- Adam Fisk http://www.littleshoot.org | http://adamfisk.wordpress.com | http://twitter.com/adamfisk |
From: Brian W. <bwe...@xb...> - 2011-10-31 19:04:23
|
On Oct 30, 2011, at 3:11 PM, Adam Fisk wrote: > Can anyone provide a quick example of verifying a DNSSEC response on the > client side. I can't seem to find good documentation on how to do this. There isn't really a such thing as "a DNSSEC response", so I'm not completely sure what you're looking for. DNSSEC signs DNS records, not DNS messages. A response from a signed zone will (typically) contain one or more RRSIG records, signing the data records, which comprise an RRset. If you have the public key (which won't be in the response), then you can call DNSSEC.verify(rrset, rrsig, pubkey). The data and signature RRsets can be obtained from Message.getSectionRRsets() on the response, and the matching signature can be found by comparing the results of getFootprint() on the public key (DNSKEY) and signature (RRSIG). I don't think it's possible to come up with a quick example of all of this, as it's not trivial. Brian |
From: Adam F. <ada...@gm...> - 2011-10-30 22:11:47
|
Can anyone provide a quick example of verifying a DNSSEC response on the client side. I can't seem to find good documentation on how to do this. Thanks very much in advance. -Adam -- View this message in context: http://old.nabble.com/DNSSSEC-verification-example-tp32749151p32749151.html Sent from the dnsjava-users mailing list archive at Nabble.com. |
From: Lucas F. <li...@sa...> - 2011-10-13 16:32:20
|
Hello Brian, Thanks for you prompt answer. I agree that introducing an interface may break backwards compatibility. But a way to allow users to define their own Zone mechanism would be great. In the end, I had to alter the visibility of several fields in the Zone class and the SetResponse class. If you can think of another solution, I am willing to spend a few cycles to help. Regards, Lucas On Wed, Oct 12, 2011 at 16:09, Brian Wellington <bwe...@xb...> wrote: > > On Oct 12, 2011, at 11:49 AM, Lucas Ferreira wrote: > >> Hello, >> >> I am working on a project based on dnsjava (actually, I am trying to >> extend Eagle DNS) and need to publish a zone which is too big too fit >> in memory, so I need to extend the Zone class. >> >> While woking on this, I am having problems because the Zone >> findRecords method must return a SetResponse object. Unfortunately, >> the SetResponse constructors and set methods are only available inside >> the org.xbill.DNS package, which makes it impossible to extend the >> Zone class without altering the dnsjava jar file. >> >> So, I have a couple of questions/suggestions: >> >> 1. Is it possible to make dnsjava more extensible by providing Zone as >> an interface, so users may provide their own Zone implementations? > > It's certainly possible, but it would break backwards compatibility, which is a bad thing. > >> 2. Is it possible to make the SetResponsible constructors and setters >> available to external classes? > > Possibly, but the external API would need some cleaning up first. > > Brian -- Homo sapiens non urinat in ventum. |
From: Brian W. <bwe...@xb...> - 2011-10-12 19:09:26
|
On Oct 12, 2011, at 11:49 AM, Lucas Ferreira wrote: > Hello, > > I am working on a project based on dnsjava (actually, I am trying to > extend Eagle DNS) and need to publish a zone which is too big too fit > in memory, so I need to extend the Zone class. > > While woking on this, I am having problems because the Zone > findRecords method must return a SetResponse object. Unfortunately, > the SetResponse constructors and set methods are only available inside > the org.xbill.DNS package, which makes it impossible to extend the > Zone class without altering the dnsjava jar file. > > So, I have a couple of questions/suggestions: > > 1. Is it possible to make dnsjava more extensible by providing Zone as > an interface, so users may provide their own Zone implementations? It's certainly possible, but it would break backwards compatibility, which is a bad thing. > 2. Is it possible to make the SetResponsible constructors and setters > available to external classes? Possibly, but the external API would need some cleaning up first. Brian |
From: Lucas F. <li...@sa...> - 2011-10-12 18:49:35
|
Hello, I am working on a project based on dnsjava (actually, I am trying to extend Eagle DNS) and need to publish a zone which is too big too fit in memory, so I need to extend the Zone class. While woking on this, I am having problems because the Zone findRecords method must return a SetResponse object. Unfortunately, the SetResponse constructors and set methods are only available inside the org.xbill.DNS package, which makes it impossible to extend the Zone class without altering the dnsjava jar file. So, I have a couple of questions/suggestions: 1. Is it possible to make dnsjava more extensible by providing Zone as an interface, so users may provide their own Zone implementations? 2. Is it possible to make the SetResponsible constructors and setters available to external classes? Thanks, Lucas -- Homo sapiens non urinat in ventum. |
From: Brian W. <bwe...@xb...> - 2011-10-10 23:43:47
|
On Oct 10, 2011, at 6:13 AM, Niel de Wet wrote: > Hi All, > > I've got this simple lookup: > > String domain = "test.surbl.org"; > String dnsblDomain = "multi.surbl.org"; > Lookup lookup = new Lookup(domain + "." + dnsblDomain, Type.ANY); > Resolver resolver = new SimpleResolver(); > lookup.setResolver(resolver); > Record[] records = lookup.run(); > > Trying to do a look up of DNS blacklists. However, at the last step an > IllegalArgumentException occurs with the message "oneElement(ANY)". I > find this very strange, since the documentation of the constructor says > "Throws: > IllegalArgumentException - The type is a meta type other than > ANY." > > What does this execption tell me? Am I missing something crucial? That there's a bug in dnsjava. I just committed a fix, which will be in the next release. It would have been easier to find if your sample code had been complete, though. The problem only occurs when there's existing data in the cache, so just attempting to run that code didn't fail. Brian |
From: Niel de W. <ni...@gm...> - 2011-10-10 13:14:14
|
Hi All, I've got this simple lookup: String domain = "test.surbl.org"; String dnsblDomain = "multi.surbl.org"; Lookup lookup = new Lookup(domain + "." + dnsblDomain, Type.ANY); Resolver resolver = new SimpleResolver(); lookup.setResolver(resolver); Record[] records = lookup.run(); Trying to do a look up of DNS blacklists. However, at the last step an IllegalArgumentException occurs with the message "oneElement(ANY)". I find this very strange, since the documentation of the constructor says "Throws: IllegalArgumentException - The type is a meta type other than ANY." What does this execption tell me? Am I missing something crucial? On the command line I do the following to test: $ host test.surbl.org.multi.surbl.org Kind Regards -- niel de wet I have forfeited my life, I counted the cost, and forsook it for a cross |
From: Brian W. <bwe...@xb...> - 2011-09-16 17:54:56
|
On Sep 15, 2011, at 8:12 PM, 邓悟 wrote: > My using scenario is very simple: > Before looking up A type record, I want to bind a local socket address. > > > // here, is there any way just like socket.bind(SocketAddress sockAddress), that lets me bind a socket address? > > Lookup l = new Lookup("u.ecctest.com",Type.A); > l.setResolver(new SimpleResolver("192.168.1.1")); > l.run(); SimpleResolver.setLocalAddress()? Brian |
From: 邓悟 <de...@ta...> - 2011-09-16 03:27:20
|
My using scenario is very simple: Before looking up A type record, I want to bind a local socket address. // here, is there any way just like socket.bind(SocketAddress sockAddress), that lets me bind a socket address? Lookup l = new Lookup("u.ecctest.com",Type.A); l.setResolver(new SimpleResolver("192.168.1.1")); l.run(); thanks de...@ta... ________________________________ This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you. 本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。 |
From: Brian W. <bwe...@xb...> - 2011-09-15 21:17:49
|
On Sep 14, 2011, at 11:35 PM, Norman Maurer wrote: > Hi Brian, > > would it be possible to push dnsjava-2.1.2 to maven central ? I can > only find dnsjava-2.1.1 there... I've never pushed any releases to maven central, as I don't use maven. I don't know who put 2.1.1 (or any other version) there, but perhaps whoever did will add the new version. Brian |
From: Norman M. <nor...@go...> - 2011-09-15 06:35:16
|
Hi Brian, would it be possible to push dnsjava-2.1.2 to maven central ? I can only find dnsjava-2.1.1 there... Thanks, Norman |
From: Periya.Data <per...@gm...> - 2011-09-05 20:42:40
|
Hi, I have a DNS packet and I want to retrieve the entries in the query section, answer section, name server resource records and additional records sections. I see several approaches in the DNS Message library. I have not yet attempted to run this code. Currently building the templates carefully. Here is what I am doing and would like to know if there are better/elegant approaches: // dns_msg.getQuestion() returns the first record in the Q section. Record[] dns_query_record_array = dns_msg.getSectionArray(Section.QUESTION); // dns_query_record_array.length must be equal to qdcount if (dns_query_record_array.length == 0) { // do something. } else { // do something...maybe print to verify int i = 0; while(i < dns_query_record_array.length) { // Record dns_query_rec = dns_query_record_array[i]; System.out.println("Resource Record: " + dns_query_rec.rdataToString()); if (dns_query_rec != null){ Name qname = dns_query_rec.getName(); String qname_s = qname.toString(); int qtype = dns_query_rec.getType(); int qclass = dns_query_rec.getDClass(); } i++; } } // Will the above get me all the entries in the question section? Or should I do something like below..????? /* Record queryRecord = dns_msg.getQuestion(); for (int q=0; q < qdcount; q++){ if (queryRecord != null){ qname = queryRecord.getName(); qname_s = qname.toString(); qtype = queryRecord.getType(); qclass = queryRecord.getDClass(); } else { qname_s = "none"; } } */ // DNS Answers // Note: there will be ANCOUNT number of resource records. You have to loop to // get all the entries of the answer section. char rdlength; char rdata; Record[] dns_answer_record_array = dns_msg.getSectionArray(Section.ANSWER); if (dns_answer_record_array.length == 0) { // do something. } else { // do something...maybe print to verify int i = 0; while(i < dns_answer_record_array.length) { Record dns_answer_rec = dns_answer_record_array[i]; System.out.println("Resource Record: " + dns_answer_rec.rdataToString()); int type = dns_answer_rec.getType(); Name name = dns_answer_rec.getName(); int rdata_class = dns_answer_rec.getDClass(); long ttl = dns_answer_rec.getTTL(); i++; } } // Name server resource records // Note: There will be NSCOUNT number of name server rr in the authority // records section. Record[] dns_nameserver_rr_array = dns_msg.getSectionArray(Section.AUTHORITY); if (dns_nameserver_rr_array.length == 0) { // do something. } else { // do something...maybe print to verify int i = 0; while(i < dns_nameserver_rr_array.length) { Record dns_nameserver_rr = dns_nameserver_rr_array[i]; System.out.println("Authority Record: " + dns_nameserver_rr.rdataToString()); i++; } } // Additional records section // Note: There will be ARCOUNT number of resource records in the additional // records section. Record[] dns_additional_record_array = dns_msg.getSectionArray(Section.ADDITIONAL); if (dns_additional_record_array.length == 0) { // do something. } else { // do something...maybe print to verify int i = 0; while(i < dns_additional_record_array.length) { Record dns_additional_rec = dns_additional_record_array[i]; System.out.println("Additional Record: " + dns_additional_rec.rdataToString()); i++; } } I have seen the RRSet and it has a nice iterator also. But, I think, a simple record array is enough for me. If there is a nice example that shows how to parse a DNS packet completely, it would be useful. Suggestions on improvements are greatly appreciated. Thanks, PD |
From: Brian W. <bwe...@xb...> - 2011-09-01 22:37:30
|
On Sep 1, 2011, at 2:57 PM, Periya.Data wrote: > Hi, > I have a bytebuffer of size 2048 bytes. Its initial bytes have some custom data (upto 70th byte). From 71st byte, the DNS messages are there. I think I know the length of the DNS message (I am not yet sure about this). > > How do I get one message at a time from the bytebuffer? > > I am doing something like this: > > byte[] dns_msg_buf= new byte[1024]; > bb.get(dns_msg_buf, 71, caplen); // bb is a byte buffer with custom data and dns msgs. Caplen is the len. > Message dns_msg = new Message(dns_msg_buf); > System.out.println("Message size: " + dns_msg.numBytes()); > > dns_msg.numBytes => seems to be returning the size of the header only = which is 12 bytes. Is there a way to find the total length of the message = hdr + 4 message sections? Message.numBytes() does return the size of the entire message; the provided "dig" helper program calls Message.toString(), which calls Message.numBytes(), and returns the full message size correctly. The code looks correct, so I suspect that there's a problem with the data you're parsing. The Message(byte []) constructor doesn't verify that the entire byte array was consumed by the parsing, so it probably wasn't. Brian |
From: Periya.Data <per...@gm...> - 2011-09-01 22:36:37
|
Right. I did a print of dns_hdr.toString(). All the 4 sections are 0. Hence, getQuestion, as you pointed out, returns null. byte[] dns_msg_buf= new byte[2048]; bb.get(dns_msg_buf, 71, caplen); Message dns_msg = new Message(dns_msg_buf); System.out.println("Message size: " + dns_msg.numBytes()); Header dns_hdr = dns_msg.getHeader(); System.out.println("DNS Header: " + dns_hdr.toString()); DNS Header: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 0 ;; flags: ; qd: 0 an: 0 au: 0 ad: 0 On Thu, Sep 1, 2011 at 3:26 PM, Brian Wellington <bwe...@xb...> wrote: > > On Sep 1, 2011, at 3:23 PM, Periya.Data wrote: > > Also, I get a null pointer exception error when I try to getName. > > // DNS Questions > Name qname; > int qtype; > int qclass; > > Record question = dns_msg.getQuestion(); > qname = question.getName(); ===> error at this line. > > I am not what that means. A valid record is not found? Is there a nice way > to check if a valid record has been returned? Maybe I am screwing up with > the starting of a valid DNS message from the bytebuffer. > > > As I said before, there's a problem with your data. If you're parsing a > message, and the DNS header indicates that there are 0 records in all of the > sections, the message parser won't try to parse any records, so > Message.getQuestion() would return null. > > Brian > |
From: Periya.Data <per...@gm...> - 2011-09-01 22:28:40
|
Thanks much for the clarifications Brian. PD. On Thu, Sep 1, 2011 at 3:26 PM, Brian Wellington <bwe...@xb...> wrote: > > On Sep 1, 2011, at 3:23 PM, Periya.Data wrote: > > Also, I get a null pointer exception error when I try to getName. > > // DNS Questions > Name qname; > int qtype; > int qclass; > > Record question = dns_msg.getQuestion(); > qname = question.getName(); ===> error at this line. > > I am not what that means. A valid record is not found? Is there a nice way > to check if a valid record has been returned? Maybe I am screwing up with > the starting of a valid DNS message from the bytebuffer. > > > As I said before, there's a problem with your data. If you're parsing a > message, and the DNS header indicates that there are 0 records in all of the > sections, the message parser won't try to parse any records, so > Message.getQuestion() would return null. > > Brian > |
From: Brian W. <bwe...@xb...> - 2011-09-01 22:26:35
|
On Sep 1, 2011, at 3:23 PM, Periya.Data wrote: > Also, I get a null pointer exception error when I try to getName. > > // DNS Questions > Name qname; > int qtype; > int qclass; > > Record question = dns_msg.getQuestion(); > qname = question.getName(); ===> error at this line. > > I am not what that means. A valid record is not found? Is there a nice way to check if a valid record has been returned? Maybe I am screwing up with the starting of a valid DNS message from the bytebuffer. As I said before, there's a problem with your data. If you're parsing a message, and the DNS header indicates that there are 0 records in all of the sections, the message parser won't try to parse any records, so Message.getQuestion() would return null. Brian |
From: Periya.Data <per...@gm...> - 2011-09-01 22:23:23
|
Also, I get a null pointer exception error when I try to getName. // DNS Questions Name qname; int qtype; int qclass; Record question = dns_msg.getQuestion(); qname = question.getName(); ===> error at this line. I am not what that means. A valid record is not found? Is there a nice way to check if a valid record has been returned? Maybe I am screwing up with the starting of a valid DNS message from the bytebuffer. Suggestions are welcome. Thanks, PD. On Thu, Sep 1, 2011 at 3:05 PM, Brian Wellington <bwe...@xb...> wrote: > > On Sep 1, 2011, at 2:57 PM, Periya.Data wrote: > > > Hi, > > I have a bytebuffer of size 2048 bytes. Its initial bytes have some > custom data (upto 70th byte). From 71st byte, the DNS messages are there. I > think I know the length of the DNS message (I am not yet sure about this). > > > > How do I get one message at a time from the bytebuffer? > > > > I am doing something like this: > > > > byte[] dns_msg_buf= new byte[1024]; > > bb.get(dns_msg_buf, 71, caplen); // bb is a byte buffer with > custom data and dns msgs. Caplen is the len. > > Message dns_msg = new Message(dns_msg_buf); > > System.out.println("Message size: " + dns_msg.numBytes()); > > > > dns_msg.numBytes => seems to be returning the size of the header only = > which is 12 bytes. Is there a way to find the total length of the message = > hdr + 4 message sections? > > Message.numBytes() does return the size of the entire message; the provided > "dig" helper program calls Message.toString(), which calls > Message.numBytes(), and returns the full message size correctly. > > The code looks correct, so I suspect that there's a problem with the data > you're parsing. The Message(byte []) constructor doesn't verify that the > entire byte array was consumed by the parsing, so it probably wasn't. > > Brian |
From: Periya.Data <per...@gm...> - 2011-09-01 21:57:15
|
Hi, I have a bytebuffer of size 2048 bytes. Its initial bytes have some custom data (upto 70th byte). From 71st byte, the DNS messages are there. I think I know the length of the DNS message (I am not yet sure about this). How do I get one message at a time from the bytebuffer? I am doing something like this: byte[] dns_msg_buf= new byte[1024]; bb.get(dns_msg_buf, 71, caplen); // bb is a byte buffer with custom data and dns msgs. Caplen is the len. Message dns_msg = new Message(dns_msg_buf); System.out.println("Message size: " + dns_msg.numBytes()); dns_msg.numBytes => seems to be returning the size of the header only = which is 12 bytes. Is there a way to find the total length of the message = hdr + 4 message sections? Thanks, PD. |
From: Norman M. <no...@ap...> - 2011-06-29 12:30:28
|
Am 28.06.2011 21:06, schrieb Norman Maurer: > Ups... Yes Brian ;) > > I will review tomorrow and let you know. > > Bye > Norman > > 2011/6/28, Brian Wellington<bwe...@xb...>: >> On Jun 27, 2011, at 10:51 PM, Norman Maurer wrote: >> >>> Hi Bill, >> Brian, not Bill. >> >>> I just noticed that you told others to use the mailinglist and not the >>> forum so I repost it here ... >>> >>> We (JAMES) are currently think about to allow our server modules to get >>> deployed in an osgi container. We have one module (dnsservice) which >>> depends on dnsjava 2.1.1 at the moment. I noticed while working on >>> getting it run in the osgi container that dnsjava 2.1.1 has a junit >>> package in its osgi imports. This is kind of a problem as junit itself >>> does not export and package via osgi. We could repackage it but it kind >>> of sucks ;) >> OK. That patch was contributed, and I don't use OSGI. >> >>> This is fixed in current dnsjava trunk. so when using dnsjava trunk >>> everything is working for us. But we cannot depend on unreleased code, >>> so my question is: >>> >>> When do you think 2.1.2 will get released ? >> Unless something comes up, within in the next week. Are there any other >> potential problems related to OSGI that are going to come up in the future? >> >> >> Brian > Hi Brian, I reviewed the generated bundle ( generated via "ant bundle") and the contained OSGI Metadata. Everything looks fine, so no futher problems expected... Thanks, Norman |
From: Brian W. <bwe...@xb...> - 2011-06-28 19:11:19
|
On Jun 27, 2011, at 10:51 PM, Norman Maurer wrote: > Hi Bill, Brian, not Bill. > I just noticed that you told others to use the mailinglist and not the > forum so I repost it here ... > > We (JAMES) are currently think about to allow our server modules to get > deployed in an osgi container. We have one module (dnsservice) which > depends on dnsjava 2.1.1 at the moment. I noticed while working on > getting it run in the osgi container that dnsjava 2.1.1 has a junit > package in its osgi imports. This is kind of a problem as junit itself > does not export and package via osgi. We could repackage it but it kind > of sucks ;) OK. That patch was contributed, and I don't use OSGI. > This is fixed in current dnsjava trunk. so when using dnsjava trunk > everything is working for us. But we cannot depend on unreleased code, > so my question is: > > When do you think 2.1.2 will get released ? Unless something comes up, within in the next week. Are there any other potential problems related to OSGI that are going to come up in the future? Brian |
From: Norman M. <no...@ap...> - 2011-06-28 19:06:57
|
Ups... Yes Brian ;) I will review tomorrow and let you know. Bye Norman 2011/6/28, Brian Wellington <bwe...@xb...>: > > On Jun 27, 2011, at 10:51 PM, Norman Maurer wrote: > >> Hi Bill, > > Brian, not Bill. > >> I just noticed that you told others to use the mailinglist and not the >> forum so I repost it here ... >> >> We (JAMES) are currently think about to allow our server modules to get >> deployed in an osgi container. We have one module (dnsservice) which >> depends on dnsjava 2.1.1 at the moment. I noticed while working on >> getting it run in the osgi container that dnsjava 2.1.1 has a junit >> package in its osgi imports. This is kind of a problem as junit itself >> does not export and package via osgi. We could repackage it but it kind >> of sucks ;) > > OK. That patch was contributed, and I don't use OSGI. > >> This is fixed in current dnsjava trunk. so when using dnsjava trunk >> everything is working for us. But we cannot depend on unreleased code, >> so my question is: >> >> When do you think 2.1.2 will get released ? > > Unless something comes up, within in the next week. Are there any other > potential problems related to OSGI that are going to come up in the future? > > > Brian |
From: Norman M. <no...@ap...> - 2011-06-28 06:18:13
|
Hi Bill, I just noticed that you told others to use the mailinglist and not the forum so I repost it here ... We (JAMES) are currently think about to allow our server modules to get deployed in an osgi container. We have one module (dnsservice) which depends on dnsjava 2.1.1 at the moment. I noticed while working on getting it run in the osgi container that dnsjava 2.1.1 has a junit package in its osgi imports. This is kind of a problem as junit itself does not export and package via osgi. We could repackage it but it kind of sucks ;) This is fixed in current dnsjava trunk. so when using dnsjava trunk everything is working for us. But we cannot depend on unreleased code, so my question is: When do you think 2.1.2 will get released ? Thanks, Norman |
From: Robert O. <un...@un...> - 2011-06-22 12:36:26
|
Here's an example of how to get serial of the SOA record: SimpleResolver res = new SimpleResolver(); Lookup lookup = new Lookup("google.com", Type.SOA); lookup.setResolver(res); Record records[] = lookup.run(); if(records.length > 0 && records[0] instanceof SOARecord){ System.out.println(((SOARecord)records[0]).getSerial()); }else{ System.out.println("Invalid response"); } _______________________________________ Robert Olofsson, Sweden http://www.unlogic.se On 2011-06-22 13:09, Tom Tucker wrote: > > I would appreciate some assistance using the getSerial() method. I am > in the process of learning Java > so please forgive my ignorance and clumsiness. As you can see below I > can retrieve the SOA record, but I'm unsure > how to grab just the serial number field. > > Thank you for your time and assistance. > > > import org.xbill.DNS.*; > import java.util.Iterator; > import java.net.UnknownHostException; > > public class DNSTest1 { > public static void main(String[] args) throws > UnknownHostException, TextParseException > { > SimpleResolver res = new SimpleResolver("192.168.22.187"); > Lookup lookup = new Lookup("mydomain.com <http://mydomain.com>", > Type.SOA); > lookup.setResolver(res); > lookup.run(); > System.out.println(lookup.getAnswers()[0]); > } > } > > mydomain.com <http://mydomain.com>.3600INSOAdns1.mydomain.com > <http://dns1.mydomain.com>. abuse.mydomain.com > <http://abuse.mydomain.com>. 326178217 10800 3600 1209600 3600 > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > > > _______________________________________________ > dnsjava-users mailing list > dns...@li... > https://lists.sourceforge.net/lists/listinfo/dnsjava-users |