| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library mdns.src.constants; | 5 library mdns.src.constants; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 InternetAddress mDnsAddress = new InternetAddress('224.0.0.251'); | 9 InternetAddress mDnsAddress = new InternetAddress('224.0.0.251'); |
| 10 const int mDnsPort = 5353; | 10 const int mDnsPort = 5353; |
| 11 | 11 |
| 12 // Offsets into the header. See https://tools.ietf.org/html/rfc1035. | 12 // Offsets into the header. See https://tools.ietf.org/html/rfc1035. |
| 13 const int idOffset = 0; | 13 const int idOffset = 0; |
| 14 const int flagsOffset = 2; | 14 const int flagsOffset = 2; |
| 15 const int qdcountOffset = 4; | 15 const int qdcountOffset = 4; |
| 16 const int ancountOffset = 6; | 16 const int ancountOffset = 6; |
| 17 const int nscountOffset = 8; | 17 const int nscountOffset = 8; |
| 18 const int arcountOffset = 10; | 18 const int arcountOffset = 10; |
| 19 | 19 |
| 20 const int headerSize = 12; | 20 const int headerSize = 12; |
| 21 | 21 |
| 22 const int srvHeaderSize = 6; |
| 23 |
| 22 const int responseFlags = 0x8400; | 24 const int responseFlags = 0x8400; |
| 23 | 25 |
| 24 class RRType { | 26 class RRType { |
| 25 static const int A = 1; | 27 static const int A = 1; |
| 26 static const int AAAA = 28; | 28 static const int AAAA = 28; |
| 27 static const int PTR = 12; | 29 static const int PTR = 12; |
| 28 static const int SRV = 33; | 30 static const int SRV = 33; |
| 29 static const int TXT = 16; | 31 static const int TXT = 16; |
| 30 } | 32 } |
| 31 | 33 |
| 32 class RRClass { | 34 class RRClass { |
| 33 static const int IN = 1; | 35 static const int IN = 1; |
| 34 } | 36 } |
| OLD | NEW |