Displaying 8 results from an estimated 8 matches for "kvp_get_domain_name".
2011 Jul 26
0
[PATCH 1/1] Staging: hv: util: kvp: Cleanup kvp_get_domain_name()
Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.
Signed-off-by:...
2011 Jul 26
0
[PATCH 1/1] Staging: hv: util: kvp: Cleanup kvp_get_domain_name()
Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.
Signed-off-by:...
2010 Dec 07
0
[PATCH]: A daemon to support HyperV KVP functionality
...+ else
+ strcat(buffer, tmp);
+ strcat(buffer, ";");
+ offset += strlen(str) + 1;
+ if ((length - offset) < (ipv6_len + 1))
+ goto getaddr_done;
+
+ }
+
+ }
+ curp = curp->ifa_next;
+ }
+
+getaddr_done:
+ freeifaddrs(ifap);
+ return error;
+}
+
+
+static int
+kvp_get_domain_name(char *buffer, int length)
+{
+ struct addrinfo hints, *info ;
+ gethostname(buffer, length);
+ int error = 0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET; /*Get only ipv4 addrinfo. */
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+
+ error = getaddrin...
2010 Dec 07
0
[PATCH]: A daemon to support HyperV KVP functionality
...+ else
+ strcat(buffer, tmp);
+ strcat(buffer, ";");
+ offset += strlen(str) + 1;
+ if ((length - offset) < (ipv6_len + 1))
+ goto getaddr_done;
+
+ }
+
+ }
+ curp = curp->ifa_next;
+ }
+
+getaddr_done:
+ freeifaddrs(ifap);
+ return error;
+}
+
+
+static int
+kvp_get_domain_name(char *buffer, int length)
+{
+ struct addrinfo hints, *info ;
+ gethostname(buffer, length);
+ int error = 0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET; /*Get only ipv4 addrinfo. */
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+
+ error = getaddrin...
2010 Dec 08
0
No subject
...else
+ strcat(buffer, tmp);
+ strcat(buffer, ";");
+ offset +=3D strlen(str) + 1;
+ if ((length - offset) < (ipv6_len + 1))
+ goto getaddr_done;
+
+ }
+
+ }
+ curp =3D curp->ifa_next;
+ }
+
+getaddr_done:
+ freeifaddrs(ifap);
+ return error;
+}
+
+
+static int
+kvp_get_domain_name(char *buffer, int length)
+{
+ struct addrinfo hints, *info ;
+ gethostname(buffer, length);
+ int error =3D 0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family =3D AF_INET; /*Get only ipv4 addrinfo. */
+ hints.ai_socktype =3D SOCK_STREAM;
+ hints.ai_flags =3D AI_CANONNAME;
+
+ error =3D...
2010 Dec 08
0
No subject
...else
+ strcat(buffer, tmp);
+ strcat(buffer, ";");
+ offset +=3D strlen(str) + 1;
+ if ((length - offset) < (ipv6_len + 1))
+ goto getaddr_done;
+
+ }
+
+ }
+ curp =3D curp->ifa_next;
+ }
+
+getaddr_done:
+ freeifaddrs(ifap);
+ return error;
+}
+
+
+static int
+kvp_get_domain_name(char *buffer, int length)
+{
+ struct addrinfo hints, *info ;
+ gethostname(buffer, length);
+ int error =3D 0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family =3D AF_INET; /*Get only ipv4 addrinfo. */
+ hints.ai_socktype =3D SOCK_STREAM;
+ hints.ai_flags =3D AI_CANONNAME;
+
+ error =3D...
2010 Dec 17
0
[PATCH 4/4] Staging: hv: Add a user-space daemon to support key/value pair (KVP)
...+ else
+ strcat(buffer, tmp);
+ strcat(buffer, ";");
+ offset += strlen(str) + 1;
+ if ((length - offset) < (ipv6_len + 1))
+ goto getaddr_done;
+
+ }
+
+ }
+ curp = curp->ifa_next;
+ }
+
+getaddr_done:
+ freeifaddrs(ifap);
+ return error;
+}
+
+
+static int
+kvp_get_domain_name(char *buffer, int length)
+{
+ struct addrinfo hints, *info ;
+ gethostname(buffer, length);
+ int error = 0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET; /*Get only ipv4 addrinfo. */
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+
+ error = getaddrin...
2010 Dec 17
0
[PATCH 4/4] Staging: hv: Add a user-space daemon to support key/value pair (KVP)
...+ else
+ strcat(buffer, tmp);
+ strcat(buffer, ";");
+ offset += strlen(str) + 1;
+ if ((length - offset) < (ipv6_len + 1))
+ goto getaddr_done;
+
+ }
+
+ }
+ curp = curp->ifa_next;
+ }
+
+getaddr_done:
+ freeifaddrs(ifap);
+ return error;
+}
+
+
+static int
+kvp_get_domain_name(char *buffer, int length)
+{
+ struct addrinfo hints, *info ;
+ gethostname(buffer, length);
+ int error = 0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET; /*Get only ipv4 addrinfo. */
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+
+ error = getaddrin...