Lines Matching full:peer
215 static int acts_start (int, struct peer *);
216 static void acts_shutdown (int, struct peer *);
218 static void acts_message (struct peer *, const char *);
219 static void acts_timecode (struct peer *, const char *);
220 static void acts_poll (int, struct peer *);
221 static void acts_timeout (struct peer *, teModemState);
222 static void acts_timer (int, struct peer *);
223 static void acts_close (struct peer *);
244 struct peer *peer in acts_start() argument
256 pp = peer->procptr; in acts_start()
259 pp->io.srcclock = peer; in acts_start()
266 peer->precision = PRECISION; in acts_start()
269 peer->sstclktype = CTL_SST_TS_TELEPHONE; in acts_start()
287 struct peer *peer in acts_shutdown() argument
296 pp = peer->procptr; in acts_shutdown()
298 acts_close(peer); in acts_shutdown()
313 struct peer *peer; in acts_receive() local
325 peer = rbufp->recv_peer; in acts_receive()
326 pp = peer->procptr; in acts_receive()
338 acts_message(peer, up->buf); in acts_receive()
344 refclock_write(peer, tptr, 1, "data"); in acts_receive()
356 struct peer *peer, in acts_message() argument
371 pp = peer->procptr; in acts_message()
400 mprintf_event(PEVNT_CLOCK, peer, "DIAL #%d %s", in acts_message()
404 refclock_write(peer, sys_phone[up->retry], in acts_message()
407 refclock_write(peer, "\r", 1, "CR"); in acts_message()
423 report_event(PEVNT_CLOCK, peer, msg); in acts_message()
435 report_event(PEVNT_CLOCK, peer, msg); in acts_message()
437 acts_timecode(peer, msg); in acts_message()
439 acts_timeout(peer, S_MSG); in acts_message()
446 report_event(PEVNT_CLOCK, peer, msg); in acts_message()
447 acts_close(peer); in acts_message()
456 struct peer *peer, in acts_timeout() argument
470 pp = peer->procptr; in acts_timeout()
493 report_event(PEVNT_CLOCK, peer, "acts: port busy"); in acts_timeout()
508 fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_ACTS | in acts_timeout()
529 refclock_write(peer, "T", 1, "T"); in acts_timeout()
539 mprintf_event(PEVNT_CLOCK, peer, "SETUP %s", in acts_timeout()
541 refclock_write(peer, modem_setup, strlen(modem_setup), in acts_timeout()
543 refclock_write(peer, "\r", 1, "CR"); in acts_timeout()
552 report_event(PEVNT_CLOCK, peer, "no modem"); in acts_timeout()
559 report_event(PEVNT_CLOCK, peer, "no answer"); in acts_timeout()
569 report_event(PEVNT_CLOCK, peer, "no timecodes"); in acts_timeout()
572 record_clock_stats(&peer->srcadr, pp->a_lastcode); in acts_timeout()
573 refclock_receive(peer); in acts_timeout()
577 acts_close(peer); in acts_timeout()
590 struct peer *peer in acts_close() argument
598 pp = peer->procptr; in acts_close()
601 report_event(PEVNT_CLOCK, peer, "close"); in acts_close()
631 struct peer *peer in acts_poll() argument
642 pp = peer->procptr; in acts_poll()
644 switch (peer->ttl) { in acts_poll()
663 * as either no peers are available or this peer is selected. in acts_poll()
666 if (!(sys_peer == NULL || sys_peer == peer)) in acts_poll()
674 acts_timeout(peer, S_IDLE); in acts_poll()
685 struct peer *peer in acts_timer() argument
697 pp = peer->procptr; in acts_timer()
702 acts_timeout(peer, S_IDLE); in acts_timer()
707 acts_timeout(peer, up->state); in acts_timer()
716 struct peer * peer, /* peer structure pointer */ in acts_timecode() argument
747 pp = peer->procptr; in acts_timecode()
772 refclock_report(peer, CEVNT_BADREPLY); in acts_timecode()
795 refclock_report(peer, CEVNT_BADREPLY); in acts_timecode()
818 refclock_report(peer, CEVNT_BADREPLY); in acts_timecode()
841 refclock_report(peer, CEVNT_BADREPLY); in acts_timecode()
859 refclock_report(peer, CEVNT_BADREPLY); in acts_timecode()
886 peer->refid = pp->refid; in acts_timecode()
894 refclock_report(peer, CEVNT_BADTIME); in acts_timecode()