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

Unified Diff: pkg/mdns/lib/src/constants.dart

Issue 1426863003: Add a mDNS package (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Addressed review comments Created 5 years, 2 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
Index: pkg/mdns/lib/src/constants.dart
diff --git a/pkg/mdns/lib/src/constants.dart b/pkg/mdns/lib/src/constants.dart
new file mode 100644
index 0000000000000000000000000000000000000000..cde6fa2b97fb5ce2fa45ab37de73f7c9e9b43ab9
--- /dev/null
+++ b/pkg/mdns/lib/src/constants.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library mdns.src.constants;
+
+import 'dart:io';
+
+InternetAddress mDnsAddress = new InternetAddress('224.0.0.251');
+const int mDnsPort = 5353;
+
+// Offsets into the header. See https://tools.ietf.org/html/rfc1035.
+const int idOffset = 0;
+const int flagsOffset = 2;
+const int qdcountOffset = 4;
+const int ancountOffset = 6;
+const int nscountOffset = 8;
+const int arcountOffset = 10;
+
+const int headerSize = 12;
+
+const int responseFlags = 0x8400;
+
+const int ipV4AddressType = 0x0001;
+const int ipV4Class = 0x8001;
+const int ipV6AddressType = 0x001c;
+const int ipV6Class = 0x8001;

Powered by Google App Engine
This is Rietveld 408576698