- if (pktlen < 4) return UREG_BROKEN_PACKET;
- /* Extract the SMS version from the packet */
- bcopy(packet, (char *)&messagep->version, sizeof(long));
- /* Convert byte order from network to host */
- messagep->version = ntohl(messagep->version);
- /* Verify version */
- if (messagep->version != CUR_SMS_VERSION) return UREG_WRONG_VERSION;
-
- packet += 4;
- pktlen -= 4;
-
- if (pktlen < 4) return UREG_BROKEN_PACKET;
- /* Extract the sequence number from the packet */
- bcopy(packet, (char *)seqnop, sizeof(long));
-
- packet += 4;
- pktlen -= 4;
-
- if (pktlen < 4) return UREG_BROKEN_PACKET;
- /* Extract the request from the packet */
- bcopy(packet, (char *)(&messagep->request), sizeof(long));
- messagep->request = ntohl(messagep->request);
- packet += 4;
- pktlen -= 4;
-
- /* Extract first name from the packet */
- messagep->first = packet;
-
- /* Scan forward until null appears in the packet or there
- is no more packet! */
- for (; *packet && pktlen > 0; --pktlen, ++packet) continue;
- if (pktlen <= 0) return UREG_BROKEN_PACKET;
-
- /* Skip over the null */
- packet++, pktlen--;
-
- /* Extract last name from the packet */
- messagep->last = packet;
-
- for (; *packet && pktlen > 0; --pktlen, ++packet) continue;
- if (pktlen <= 0) return UREG_BROKEN_PACKET;
-
- packet++, pktlen--;
-
- if (pktlen <= 0) return UREG_BROKEN_PACKET;
-
- /* Extract MIT id information from packet; see comment on
- struct msg. */
- messagep->enc_mitid = packet;
- messagep->enc_mitid_len = pktlen;
-
- return 0;
-}
+ char *login;
+ char *q_name; /* Name of Moira query */
+ int q_argc; /* Number of arguments for Moira query */
+ char *q_argv[2]; /* Arguments to get user by uid */
+ char state[7]; /* Can hold a 16 bit integer */
+ int status; /* Error status */