        .title  cialst
;
;  Author     : Arne Vajhøj
;
;  Programmed : november 1994 by Arne Vajhøj
;
;  Purpose    : lookup all intrusion records
;
        .link   "sys$system:sys.stb"/selective_search
        .library "SYS$LIBRARY:LIB"
        $SSDEF
        $CIADEF
        .psect  $CODE quad,pic,con,lcl,shr,exe,nowrt
;
;  Entry : CIALST ( SRC, NSRC, TIM )
;
;  Functionality : Lookup all intrusion records with source and date
;
;  Arguments : SRC
;              source
;              fixed length chracter string passed by descriptor (array)
;              writeonly
;
;              NSRC
;              number of sources
;              longword passed by refrence
;              writeonly
;
;              TIM
;              time
;              longword passed by refrence (array)
;              writeonly
;
;  Priviliges required : CMEXEC
;
;  return codes : SS$_NORMAL       successfull
;                 SS$_NOPRIV       no CMEXEC privilige present
;
;  Bugs : Please mail bug-reports to ARNE@KO.HHS.DK (Arne Vajhøj).
;
;;VAX
        .entry  cialst,^m<r2,r3,r4,r5>
;;VAX
;;AXP
;;cialst:: .call_entry home_args=TRUE,max_args=3
;;AXP
        pushl   ap
        pushab  G^cialst2
        calls   #2,G^SYS$CMEXEC         ; executive-mode call of cialst2
        cmpl    r0,#SS$_NORMAL
        bneq    100$
        ret
100$:   clrl    @B^8(ap)
        ret
        .entry  cialst2,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>
        movl    B^4(ap),r6
        movzwl  (r6),r7                 ; length of character
        movl    B^4(r6),r6              ; address of character
        clrl    @B^8(ap)                ; nsrc=0
        movl    B^12(ap),r9             ; address of time
        movab   @#CIA$GQ_INTRUDER,r10   ; address of intrusion database
        movl    r10,r11
100$:   cmpl    B^CIA$L_FLINK(r11),r10  ; test if circled
        beql    200$
        movl    B^CIA$L_FLINK(r11),r11  ; next record
        movc3   r7,B^CIA$T_DATA(r11),(r6)    ; get source
        addl2   r7,r6
        movq    B^CIA$Q_TIME(r11),(r9)+      ; get time
        incl    @B^8(ap)
        brb     100$
200$:   movl    #SS$_NORMAL,r0
        ret
        .end
