× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: errors during bind
  • From: PhaniHR@xxxxxxx (PhaniHR)
  • Date: Thu, 23 Apr 1998 22:38:41 -0700

     Hi,
     
     We have this serious problem. Please help us to resolve this at this 
     earliest. We got the following errors during bind on AS/400
     
     - EINVAL (The value specified for the argument is not correct.) - 
     EUNKNOWN (Unknown system state.)
     
     These errors occured at different times and persisted for sometime. 
     EINVAL was solved by doing an IPL. But EUNKNOWN persisted even after 
     doing an IPL.
     
     
     Doubts :
     
     1. What does EUNKNOWN mean ?
     2. Under what conditions does EUNKNOWN occur during bind ? 3. What are 
     the corrective actions for EUNKNOWN ? 
     4. If EUNKNOWN error happens again, what are the steps we should take  
     in order to give more information to you ?
     5. What do we have to do to prevent EUNKNOWN from happening again ? 6. 
     What do we have to do to prevent EINVAL from happening again ?
     7. How can we find out whether a particular address (say, "RS2000" for 
     UDP socket) is already in use ? What we would like to know is how   we 
     can find from a program (say A) that a particular address is in  use 
     by a different program (say B).
     
     
     
     The code is as follows
     
     ....
     ....
     
     int CreateUDPSock(char * UDPFile)
     {
     struct sockaddr_un servaddr;
     int servlen, sockfd;
     
     memset(&servaddr,'\0', sizeof(servaddr)); servaddr.sun_family = 
     AF_UNIX; strcpy(servaddr.sun_path, UDPFile);
     servlen = SUN_LEN(&servaddr);
     
     if((sockfd=socket(AF_UNIX,SOCK_DGRAM,0)) < 0) { printf("Error opening 
     UDP socket\n"); return -1; }
     
     unlink(UDPFile);
     errno = 0;           /* Ignore the EBADF error */
     
     if(bind(sockfd,(struct sockaddr *)&servaddr,servlen) < 0) { 
     perror("error in bind");          /* ERROR noticed here */ return -1; 
     }
     
     return sockfd;
     }
     
     void main()
     {
     int sockfd;
     
     sockfd = CreateUDPSock("RS2000");
     ....
     ....
     }
     
     
     
     
     Best regards,
     
     Phaniraj
     
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.