commit | b1aa65a7ebca0ea104f8c85c01550384dca9c0dd | [log] [tgz] |
---|---|---|
author | chenbruce <chenbruce@google.com> | Tue Jun 15 19:37:05 2021 +0800 |
committer | chenbruce <chenbruce@google.com> | Wed Jun 16 10:52:55 2021 +0800 |
tree | 33b9b9ffcb85b6ffe17f0ebc5b6887b955c68404 | |
parent | 76620646019a105248207c307abb217423777545 [diff] |
Add setupUdpSocket() and use it in send_dg() When implementing mDNS .local resolution, it would have the exact same code to setup a udp socket as send_dg(). Factor it into a common helper function. Bug: 140857615 Test: cd packages/modules/DnsResolver && atest Change-Id: Id2a5945b85ea306ddbcc6ee84aa876ac0b7709fc
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.