Lines Matching refs:up
141 as2201_start, /* start up driver */
160 register struct as2201unit *up;
176 up = emalloc_zero(sizeof(*up));
185 free(up);
188 pp->unitptr = up;
196 up->lastptr = up->stats;
197 up->index = 0;
211 register struct as2201unit *up;
215 up = pp->unitptr;
218 if (NULL != up)
219 free(up);
231 register struct as2201unit *up;
242 up = pp->unitptr;
247 up->linect, pp->lencode, pp->a_lastcode);
265 if (up->linect > 0) {
266 up->linect--;
267 if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2)
269 *up->lastptr++ = ' ';
270 memcpy(up->lastptr, pp->a_lastcode, 1 + pp->lencode);
271 up->lastptr += pp->lencode;
275 up->linect = atoi(pp->a_lastcode);
278 record_clock_stats(&peer->srcadr, up->stats);
281 printf("gps: stat %s\n", up->stats);
285 up->lastptr = up->stats;
286 *up->lastptr = '\0';
331 if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2)
333 memcpy(up->lastptr, pp->a_lastcode, pp->lencode);
334 up->lastptr += pp->lencode;
336 octets = strlen(stat_command[up->index]);
337 if ((int)(up->lastptr - up->stats + 1 + octets) > SMAX - 2)
339 *up->lastptr++ = ' ';
340 memcpy(up->lastptr, stat_command[up->index], octets);
341 up->lastptr += octets - 1;
342 *up->lastptr = '\0';
343 refclock_write(peer, stat_command[up->index],
344 strlen(stat_command[up->index]),
346 up->index++;
347 if (*stat_command[up->index] == '\0')
348 up->index = 0;