pidentd  3.0.19
About: implementation of the RFC1413 identification server (more or less complete rewrite compared to version 2)
  Fossies Dox: pidentd-3.0.19.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

k_osf4.c File Reference
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
#include <nlist.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/in_pcb.h>
#include "pkvm.h"
#include "pidentd.h"
Include dependency graph for k_osf4.c:

Go to the source code of this file.

Data Structures

struct  pid_entry
 
struct  kainfo
 

Macros

#define SHOW_UTT
 
#define KERNEL_FILE
 
#define PID_INVALID(pid)   ((pid_t)(pid) < 0 || (pid_t)(pid) > (pid_t)PID_MAX)
 
#define INVALID_UID(uid)   ((uid_t)(uid) < 0 || (uid_t)(uid) > (uid_t)UID_MAX)
 
#define NOFILE_IN_U   NOFILE
 
#define BUFLEN   1024 /* buffer length */
 
#define N_PIDTAB   0
 
#define N_NPID   1
 
#define the_proc   pu.The_Proc
 
#define proc_utask   pu.Proc_Utask
 
#define p_i   the_pid_entry[index]
 
#define f_s   proc_utask.uu_file_state
 
#define goodr(k, addr, buf, len)   (kvm_read(k,addr,buf,len) == len)
 
#define badr(k, addr, buf, len)   (kvm_read(k,addr,buf,len) != len)
 

Functions

int ka_init (void)
 
int ka_open (void **misc)
 
int ka_lookup (void *vp, struct kernel *kp)
 

Macro Definition Documentation

◆ badr

#define badr (   k,
  addr,
  buf,
  len 
)    (kvm_read(k,addr,buf,len) != len)

◆ BUFLEN

#define BUFLEN   1024 /* buffer length */

Definition at line 121 of file k_osf4.c.

◆ f_s

#define f_s   proc_utask.uu_file_state

◆ goodr

#define goodr (   k,
  addr,
  buf,
  len 
)    (kvm_read(k,addr,buf,len) == len)

◆ INVALID_UID

#define INVALID_UID (   uid)    ((uid_t)(uid) < 0 || (uid_t)(uid) > (uid_t)UID_MAX)

Definition at line 112 of file k_osf4.c.

◆ KERNEL_FILE

#define KERNEL_FILE

Definition at line 79 of file k_osf4.c.

◆ N_NPID

#define N_NPID   1

Definition at line 124 of file k_osf4.c.

◆ N_PIDTAB

#define N_PIDTAB   0

Definition at line 123 of file k_osf4.c.

◆ NOFILE_IN_U

#define NOFILE_IN_U   NOFILE

Definition at line 118 of file k_osf4.c.

◆ p_i

#define p_i   the_pid_entry[index]

◆ PID_INVALID

#define PID_INVALID (   pid)    ((pid_t)(pid) < 0 || (pid_t)(pid) > (pid_t)PID_MAX)

Definition at line 109 of file k_osf4.c.

◆ proc_utask

#define proc_utask   pu.Proc_Utask

◆ SHOW_UTT

#define SHOW_UTT

Definition at line 77 of file k_osf4.c.

◆ the_proc

#define the_proc   pu.The_Proc

Function Documentation

◆ ka_init()

int ka_init ( void  )

Definition at line 134 of file k_osf4.c.

References osinfo_build, and osinfo_get().

◆ ka_lookup()

int ka_lookup ( void *  vp,
struct kernel kp 
)

◆ ka_open()

int ka_open ( void **  misc)

Definition at line 149 of file k_osf4.c.

References kainfo::kd, kvm_close(), kvm_nlist(), kvm_open(), kainfo::nl, s_free(), and s_malloc().