/*
+ * $Id: status.c,v 1.3 2001-06-20 18:33:04 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#ifndef USE_GETHOSTID
#include <sys/sysctl.h>
-#endif
-#endif
+#endif /* USE_GETHOSTID */
+#endif /* BSD4_4 */
#include <netatalk/at.h>
#include <netatalk/endian.h>
int len;
#ifdef AFS
const char *machine = "afs";
-#else !AFS
+#else /* !AFS */
const char *machine = "unix";
-#endif
+#endif /* AFS */
memcpy(&status, start + AFPSTATUS_MACHOFF, sizeof(status));
data += ntohs( status );
#ifdef BSD4_4
int mib[2];
size_t len;
-#endif
+#endif /* BSD4_4 */
status = data;
mib[1] = KERN_HOSTID;
len = sizeof(hostid);
sysctl(mib, 2, &hostid, &len, NULL, 0);
-#else
+#else /* BSD4_4 && USE_GETHOSTID */
hostid = gethostid();
-#endif
+#endif /* BSD4_4 && USE_GETHOSTID */
if (!hostid) {
if (dsi)
hostid = dsi->server.sin_addr.s_addr;
memcpy(data, &ddpaddr->sat_port, sizeof(ddpaddr->sat_port));
data += sizeof(ddpaddr->sat_port);
}
-#endif
+#endif /* ! NO_DDP */
/* return length of buffer */
return (data - begin);
aspconfig->signature = status + sigoff;
aspconfig->statuslen = c;
}
-#endif
+#endif /* ! NO_DDP */
if (dsiconfig) {
if (aspconfig) { /* copy to dsiconfig */