Sponsored Content
Full Discussion: gethostbyname failed
Special Forums Windows & DOS: Issues & Discussions gethostbyname failed Post 302369963 by Saurabh78 on Tuesday 10th of November 2009 04:30:35 AM
Old 11-10-2009
gethostbyname failed

gethostbyname is failing and returning NULL on Windows 7. Should i use inet_addr or there is other way to get it
 

10 More Discussions You Might Find Interesting

1. Programming

g++ is OK while gcc is failed

#include <iostream> using namespace std; int main(void) { cout << "hello" << endl; return 0; } I tried this: 1) g++ test.cpp -o test // It's OK 2) gcc test.cpp -o test // Failed /tmp/ccriZviL.o(.text+0x14): In function `main': : undefined reference to... (3 Replies)
Discussion started by: princelinux
3 Replies

2. Solaris

mirror failed

i am working in sun solaris unix platform with storage device T3+ i got an error message mirror failed i have telneted to the storage and gave the command format it gives disk not available , i have shifted my storage from node A to node B then i gave the same command format by telneting to... (0 Replies)
Discussion started by: sasiprabu
0 Replies

3. Programming

regarding gethostbyname()

iam using gethostbyname for verifing whether net is active or not it's work fine but how it's work i mean whether it is using ping or sending socket, who it determining the internet . thank u in advance sree (2 Replies)
Discussion started by: phani_sree
2 Replies

4. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies

5. UNIX for Dummies Questions & Answers

Ok. I've have looked and failed.

What I want seems to me should be simple but so am I so.... I have a Unix server that is running a program we will say logged in as UserA. The program is outputting a bunch of stuff to the terminal. I would like to log in from my machine to the server as Either UserA, UserB or if needed... (2 Replies)
Discussion started by: Dishevel
2 Replies

6. OS X (Apple)

Failed Drive

I am trying to recover data off a drive that failed in my iMac. Apple returned the drive to me and I purchased a hard drive enclosure. I have been doing research on prices for data recovery services, way too expensive. I seen some links using Unix DD commands in the terminal none of which worked.... (6 Replies)
Discussion started by: KJ1906
6 Replies

7. IP Networking

The system function gethostbyname() failed to find the client's host name

As we are facing issue with this server connection. The error is: The system function gethostbyname() failed to find the client's host name. how can i check if the server "server1" is able to resolve the client hostname (hosts / dns)? i can ping the client from server. any... (1 Reply)
Discussion started by: jinslick25
1 Replies

8. Solaris

Cygwin X Server error: xdmcp fatal error session failed session 23 failed for display

Hi, i got the following error when i tried to access the cygwin x server from a windows XP PC. "xdmcp fatal error session failed session 23 failed for display" Alternatively, when i tried to access the same Cygwin X Server from another windows XP PC which is on a different LAN... (3 Replies)
Discussion started by: HarishKumarM
3 Replies

9. UNIX for Dummies Questions & Answers

FTP failed

Hi All, We are using the following step to place a file in server using FTP STEP_EXECUTE STEP090 /usr/pjc/bin/FTP -i DATASET FTPIN $sic/ctl/ftpsic.ctl DISP=OLD,KEEP,KEEP STEP_END If we run this step we are getting the error. ftp> open arg.mnd.appsc.com Connected to arg.mnd.appsc.com.... (4 Replies)
Discussion started by: ajaykumarkona
4 Replies

10. Red Hat

Failed to su to user

I am unable to su to functional user, though changed the soft-hard limit for open files in limits.conf. The following command did not help.ulimit -n <value>While su to user, the error I am getting is -su: cannot set user id: Resource temporarily unavailableWhether I need to restart the application... (1 Reply)
Discussion started by: atanubanerji
1 Replies
INET(3N)																  INET(3N)

NAME
inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, inet_netof - Internet address manipulation routines SYNOPSIS
#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> unsigned long inet_addr(cp) char *cp; unsigned long inet_network(cp) char *cp; char *inet_ntoa(in) struct in_addr in; struct in_addr inet_makeaddr(net, lna) long net, lna; long inet_lnaof(in) struct in_addr in; long inet_netof(in) struct in_addr in; DESCRIPTION
The routines inet_addr and inet_network each interpret character strings representing numbers expressed in the Internet standard "." nota- tion, returning numbers suitable for use as Internet addresses and Internet network numbers, respectively. The routine inet_ntoa takes an Internet address and returns an ASCII string representing the address in "." notation. The routine inet_makeaddr takes an Internet net- work number and a local network address and constructs an Internet address from it. The routines inet_netof and inet_lnaof break apart Internet host addresses, returning the network number and local network address part, respectively. All Internet address are returned in network order (bytes ordered from left to right). All network numbers and local address parts are returned as machine format integer values. INTERNET ADDRESSES
Values specified using the "." notation take one of the following forms: a.b.c.d a.b.c a.b a When four parts are specified, each is interpreted as a byte of data and assigned, from left to right, to the four bytes of an Internet address. Note that when an Internet address is viewed as a 32-bit integer quantity on the VAX the bytes referred to above appear as "d.c.b.a". That is, VAX bytes are ordered from right to left. When a three part address is specified, the last part is interpreted as a 16-bit quantity and placed in the right most two bytes of the network address. This makes the three part address format convenient for specifying Class B network addresses as "128.net.host". When a two part address is supplied, the last part is interpreted as a 24-bit quantity and placed in the right most three bytes of the net- work address. This makes the two part address format convenient for specifying Class A network addresses as "net.host". When only one part is given, the value is stored directly in the network address without any byte rearrangement. All numbers supplied as "parts" in a "." notation may be decimal, octal, or hexadecimal, as specified in the C language (i.e., a leading 0x or 0X implies hexadecimal; otherwise, a leading 0 implies octal; otherwise, the number is interpreted as decimal). SEE ALSO
gethostbyname(3N), getnetent(3N), hosts(5), networks(5), DIAGNOSTICS
The value -1 is returned by inet_addr and inet_network for malformed requests. BUGS
The problem of host byte ordering versus network byte ordering is confusing. A simple way to specify Class C network addresses in a manner similar to that for Class B and Class A is needed. The string returned by inet_ntoa resides in a static memory area. Inet_addr should return a struct in_addr. 4.2 Berkeley Distribution May 27, 1986 INET(3N)
All times are GMT -4. The time now is 02:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy