(UNIX only) Sends a message to a User Datagram Protocol (UDP) port.


sp_sendmsg ip_address, port_number, message




There are additional considerations when using sp_sendmsg:
  • To enable the use of UDP messaging, a system security officer must set the configuration parameter allow sendmsg to 1.

  • No security checks are performed with sp_sendmsg. Be very cautious when using sp_sendmsg to send sensitive information across the network. By enabling this functionality, the user accepts any security problems that result from its use.

  • This sample C program listens on a port that you specify and echoes the messages it receives. For example, to receive the sp_sendmsg calls for Example 1, use:
    updmon 3456
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <unistd.h>
    #include <fcntl.h>
    main(argc, argv)
    int argc; char *argv[];
            struct sockaddr_in sadr;
            int portnum,sck,dummy,msglen;
            char msg[256];
            if (argc < 2) {
                    printf(“Usage: udpmon <udp portnum>\n”);
            if ((portnum=atoi(argv[1])) < 1) {
                    printf("Invalid udp portnum\n");
            if ((sck=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP)) < 0) {
                    printf("Couldn't create socket\n");
            sadr.sin_family = AF_INET;
            sadr.sin_addr.s_addr = inet_addr("");
            sadr.sin_port = portnum;
            if (bind(sck,&sadr,sizeof(sadr)) < 0) {
                    printf("Couldn't bind requested udp port\n");
            for (;;)
                    if((msglen=recvfrom(sck,msg,sizeof(msg),0,NULL,&dummy)) < 0)
                            printf("Couldn't recvfrom() from udp port\n");
                    printf("%.*s\n", msglen, msg);
See also:
  • syb_sendmsg in Reference Manual: Building Blocks


Any user can execute sp_sendmsg. Permission checks do not differ based on the granular permissions settings.


Values in event and extrainfo columns from the sysaudits table are:



Audit option


Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect