The ref to netaddr describes the socket and hname is obtained from that object subject to the DNR option. So, it’s intimately tied to the passed netaddr object. So, simply calling the Name() function on that object will accomplish what you want. The only reason we pass in hname is for backward compatibility reasons and people should be using the endPoint reference but we didn’t have time to change it in every security protocol (so we didn’t). You might want to consider doing that instead and not using hname at all. Anyway, if you call Name() on endpoint it will do a getaddrinfo() call with the same options you have to get a canonical name for the endpoint.

From: Brian Bockelman
Sent: Thursday, June 07, 2018 2:08 PM
To: xrootd/xrootd
Cc: Andrew Hanushevsky ; Comment
Subject: Re: [xrootd/xrootd] Use DNS lookups to expand non-FQDNs (#731)

I don’t think anything in NetAddr does precisely this. Should I add a new static method?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/xrootd/xrootd/pull/731#issuecomment-395570559","url":"https://github.com/xrootd/xrootd/pull/731#issuecomment-395570559","name":"View Pull Request"},"description":"View this Pull Request on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}} {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@abh3 in #731: The ref to netaddr describes the socket and hname is obtained from that object subject to the DNR option. So, it’s intimately tied to the passed netaddr object. So, simply calling the Name() function on that object will accomplish what you want. The only reason we pass in hname is for backward compatibility reasons and people should be using the endPoint reference but we didn’t have time to change it in every security protocol (so we didn’t). You might want to consider doing that instead and not using hname at all. Anyway, if you call Name() on endpoint it will do a getaddrinfo() call with the same options you have to get a canonical name for the endpoint. \n\nFrom: Brian Bockelman \nSent: Thursday, June 07, 2018 2:08 PM\nTo: xrootd/xrootd \nCc: Andrew Hanushevsky ; Comment \nSubject: Re: [xrootd/xrootd] Use DNS lookups to expand non-FQDNs (#731)\n\nI don’t think anything in NetAddr does precisely this. Should I add a new static method?\n\n—\nYou are receiving this because you commented.\nReply to this email directly, view it on GitHub, or mute the thread.\n"}],"action":{"name":"View Pull Request","url":"https://github.com/xrootd/xrootd/pull/731#issuecomment-395570559"}}} { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [xrootd/xrootd] Use DNS lookups to expand non-FQDNs (#731)", "sections": [ { "text": "", "activityTitle": "**Andrew Hanushevsky**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@abh3", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"xrootd/xrootd\",\n\"issueId\": 731,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close pull request", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"xrootd/xrootd\",\n\"pullRequestId\": 731\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/xrootd/xrootd/pull/731#issuecomment-395570559" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 343573995\n}" } ], "themeColor": "26292E" }

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1