Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: net/dns/dns_response.h

Issue 14049018: Add simple non-response-based question parsing for mDNS passive listening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/dns/dns_response.cc » ('j') | net/dns/dns_response.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_response.h
diff --git a/net/dns/dns_response.h b/net/dns/dns_response.h
index 78fb73571028ad6fa3e47d2f81eaf1516e373372..4a445d967aac11cbc651a42174378b04ed1b1be6 100644
--- a/net/dns/dns_response.h
+++ b/net/dns/dns_response.h
@@ -67,6 +67,9 @@ class NET_EXPORT_PRIVATE DnsRecordParser {
// Parses the next resource record into |record|. Returns true if succeeded.
bool ReadRecord(DnsResourceRecord* record);
+ // Skip a question section, returns true if succeeded.
+ bool SkipQuestion();
+
private:
const char* packet_;
size_t length_;
@@ -115,6 +118,10 @@ class NET_EXPORT_PRIVATE DnsResponse {
// packet matches the |query| id and question.
bool InitParse(int nbytes, const DnsQuery& query);
+ // Assuming the internal buffer holds |nbytes| bytes, initialize the parser
+ // without matching it against an existing query.
+ bool InitParseWithoutQuery(int nbytes);
+
// Returns true if response is valid, that is, after successful InitParse.
bool IsValid() const;
« no previous file with comments | « no previous file | net/dns/dns_response.cc » ('j') | net/dns/dns_response.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698