+
+ if ( (!strcmp(protocol, "unix")) || (atoi(service)<0) ) {
+ memset(&sun, 0, sizeof(sun));
+ sun.sun_family = AF_UNIX;
+ sprintf(sun.sun_path, USOCKPATH, 0-atoi(service) );
+
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (s < 0) {
+ fprintf(stderr, "Can't create socket: %s\n",
+ strerror(errno));
+ logoff(3);
+ }
+
+ if (connect(s, (struct sockaddr *) &sun, sizeof(sun)) < 0) {
+ fprintf(stderr, "can't connect: %s\n",
+ strerror(errno));
+ logoff(3);
+ }
+
+ return s;
+ }
+
+
+ /* otherwise it's a network connection */
+