Skip to content

Instantly share code, notes, and snippets.

@ztmr
Created January 19, 2014 20:17
Show Gist options
  • Save ztmr/8510453 to your computer and use it in GitHub Desktop.
Save ztmr/8510453 to your computer and use it in GitHub Desktop.
Add a new record to the OpenVMS intrusion database. Uses a $SCAN_INTRUSION system service. http://h71000.www7.hp.com/doc/82final/4527/4527pro_097.html#jul93_317
/*
* addInt.c, v0.1 -- Manually add an intrusion database record
*/
#include <stdio.h>
#include <stdlib.h>
#include <descrip.h>
#include <ssdef.h>
#include <jpidef.h>
#include <ciadef.h>
#include <libdef.h>
#include <lib$routines.h>
$DESCRIPTOR (desc$src_node, "INTRUSION");
unsigned int status;
void add_intrusion () {
status = sys$scan_intrusion (SS$_NOSUCHUSER, CIA$_FAILED_USERNAME, JPI$K_NETWORK,
0, 0, 0, desc$src_node, 0, 0, 0,
CIA$M_IGNORE_RETURN | CIA$M_REAL_USERNAME);
if ((status & 1) != SS$_NORMAL)
lib$signal (status);
else
printf ("Record successfully registered.");
}
void main (int argc, char *argv []) {
add_intrusion ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment