Questions tagged [getnameinfo]

9 questions
2
votes
0 answers

Why does windows name resolution replaces "localhost" with computer name?

I discovered recently that Windows 7 (probably other versions too) shows no longer "localhost", but the computer name (with domain), when resolving the IP address 127.0.0.1 or ::1. The strange thing is, that this still occurs, if I add this mapping…
Andreas Mueller
  • 201
  • 4
  • 13
2
votes
1 answer

Swift getnameinfo unreliable results for IPv6

I have the following extension on sockaddr: extension sockaddr { /// Indicates if this is an IPv4 address. var isIPv4: Bool { return sa_family == UInt8(AF_INET) } /// Indicates if this is an IPv6 address. var isIPv6: Bool { return…
Yvo
  • 18,681
  • 11
  • 71
  • 90
1
vote
1 answer

Why getaddrinfo( ) always cause segmentation fault?

#include #include #include int main(){ char buff[50]; char port[5]; printf("Enter address to lookup: "); fgets(buff, 50, stdin); printf("Enter Port: "); fgets(port, 5, stdin); struct…
KMG
  • 1,433
  • 1
  • 8
  • 19
0
votes
0 answers

SocketError: sockaddr resolved to multiple nodename

Following snippet failing for ruby, removing of this snippet didn't show any error. I see closed issue https://bugs.ruby-lang.org/issues/15067 , are they same. Any input on this snippet will be very useful. platform_is_not :windows do …
R_SS
  • 317
  • 5
  • 21
0
votes
1 answer

Applescript get name exception

In one of my scripts I need the file name: set input to choose file multiple selections allowed yes tell application "System Events" set {nameInfo, sourcePath} to {name of item 1 of input, POSIX path of container of item 1 of input} end…
Atalantia
  • 33
  • 1
  • 10
0
votes
1 answer

getnameinfo() gives me strange hostname

I have problem. I want to convert IP address (81.2.195.254) to hostname (www.farnost-hranice.cz). Here you can try to convert this IP address to see, that it is right: https://whatismyipaddress.com/hostname-ip My problem is, that when I try to…
Petr Marek
  • 59
  • 1
  • 7
0
votes
1 answer

`getnameinfo()` failing on WSL

I'm writing some cross-platform networking code, and have come across some inconsistent behavior in getnameinfo() on Windows and Linux (WSL). The code below does the following: Get an address using getaddrinfo(). Calls getnameinfo() on the address…
user673679
  • 1,327
  • 1
  • 16
  • 35
0
votes
1 answer

Enumeration handle names issue

I found a way to enumerate other programs handles, but I have problem now. I can not see Process type threads. I need to check which programs open handles for my process. When I check the output, it is "unnamed", I don't know how to fix it. Should…
ismet JM
  • 21
  • 1
  • 9
-1
votes
1 answer

In C# 1st very new to coding This is for a College class. I have created as instructed BUT GetName and SetName show as NO method?

Code should get user to input first & last name. using System; namespace CSCI_231_Week3_Assn_8 { class AccountTest { static void Main() { // Create an Account object and assign it to myAccount AccountTest…