5 #include <sys/syslog.h>
8 constant_LOG_NO(char *name, int len, int arg)
10 switch (name[6 + 0]) {
12 if (strEQ(name + 6, "TICE")) { /* LOG_NO removed */
20 if (strEQ(name + 6, "WAIT")) { /* LOG_NO removed */
37 constant_LOG_N(char *name, int len, int arg)
39 switch (name[5 + 0]) {
41 if (strEQ(name + 5, "DELAY")) { /* LOG_N removed */
49 if (strEQ(name + 5, "EWS")) { /* LOG_N removed */
57 if (strEQ(name + 5, "FACILITIES")) { /* LOG_N removed */
58 #ifdef LOG_NFACILITIES
59 return LOG_NFACILITIES;
65 return constant_LOG_NO(name, len, arg);
76 constant_LOG_P(char *name, int len, int arg)
78 switch (name[5 + 0]) {
80 if (strEQ(name + 5, "ID")) { /* LOG_P removed */
88 if (strEQ(name + 5, "RIMASK")) { /* LOG_P removed */
105 constant_LOG_AU(char *name, int len, int arg)
111 switch (name[6 + 2]) {
113 if (strEQ(name + 6, "TH")) { /* LOG_AU removed */
121 if (strEQ(name + 6, "THPRIV")) { /* LOG_AU removed */
138 constant_LOG_A(char *name, int len, int arg)
140 switch (name[5 + 0]) {
142 if (strEQ(name + 5, "LERT")) { /* LOG_A removed */
150 return constant_LOG_AU(name, len, arg);
161 constant_LOG_CR(char *name, int len, int arg)
163 switch (name[6 + 0]) {
165 if (strEQ(name + 6, "IT")) { /* LOG_CR removed */
173 if (strEQ(name + 6, "ON")) { /* LOG_CR removed */
190 constant_LOG_C(char *name, int len, int arg)
192 switch (name[5 + 0]) {
194 if (strEQ(name + 5, "ONS")) { /* LOG_C removed */
202 return constant_LOG_CR(name, len, arg);
213 constant_LOG_D(char *name, int len, int arg)
215 switch (name[5 + 0]) {
217 if (strEQ(name + 5, "AEMON")) { /* LOG_D removed */
225 if (strEQ(name + 5, "EBUG")) { /* LOG_D removed */
242 constant_LOG_U(char *name, int len, int arg)
244 switch (name[5 + 0]) {
246 if (strEQ(name + 5, "SER")) { /* LOG_U removed */
254 if (strEQ(name + 5, "UCP")) { /* LOG_U removed */
271 constant_LOG_E(char *name, int len, int arg)
273 switch (name[5 + 0]) {
275 if (strEQ(name + 5, "MERG")) { /* LOG_E removed */
283 if (strEQ(name + 5, "RR")) { /* LOG_E removed */
300 constant_LOG_F(char *name, int len, int arg)
302 switch (name[5 + 0]) {
304 if (strEQ(name + 5, "ACMASK")) { /* LOG_F removed */
312 if (strEQ(name + 5, "TP")) { /* LOG_F removed */
329 constant_LOG_LO(char *name, int len, int arg)
335 switch (name[6 + 3]) {
337 if (strEQ(name + 6, "CAL0")) { /* LOG_LO removed */
345 if (strEQ(name + 6, "CAL1")) { /* LOG_LO removed */
353 if (strEQ(name + 6, "CAL2")) { /* LOG_LO removed */
361 if (strEQ(name + 6, "CAL3")) { /* LOG_LO removed */
369 if (strEQ(name + 6, "CAL4")) { /* LOG_LO removed */
377 if (strEQ(name + 6, "CAL5")) { /* LOG_LO removed */
385 if (strEQ(name + 6, "CAL6")) { /* LOG_LO removed */
393 if (strEQ(name + 6, "CAL7")) { /* LOG_LO removed */
410 constant_LOG_L(char *name, int len, int arg)
412 switch (name[5 + 0]) {
414 if (strEQ(name + 5, "FMT")) { /* LOG_L removed */
422 return constant_LOG_LO(name, len, arg);
424 if (strEQ(name + 5, "PR")) { /* LOG_L removed */
441 constant(char *name, int len, int arg)
448 switch (name[0 + 4]) {
450 if (!strnEQ(name + 0,"LOG_", 4))
452 return constant_LOG_A(name, len, arg);
454 if (!strnEQ(name + 0,"LOG_", 4))
456 return constant_LOG_C(name, len, arg);
458 if (!strnEQ(name + 0,"LOG_", 4))
460 return constant_LOG_D(name, len, arg);
462 if (!strnEQ(name + 0,"LOG_", 4))
464 return constant_LOG_E(name, len, arg);
466 if (!strnEQ(name + 0,"LOG_", 4))
468 return constant_LOG_F(name, len, arg);
470 if (strEQ(name + 0, "LOG_INFO")) { /* removed */
478 if (strEQ(name + 0, "LOG_KERN")) { /* removed */
486 if (!strnEQ(name + 0,"LOG_", 4))
488 return constant_LOG_L(name, len, arg);
490 if (strEQ(name + 0, "LOG_MAIL")) { /* removed */
498 if (!strnEQ(name + 0,"LOG_", 4))
500 return constant_LOG_N(name, len, arg);
502 if (strEQ(name + 0, "LOG_ODELAY")) { /* removed */
510 if (!strnEQ(name + 0,"LOG_", 4))
512 return constant_LOG_P(name, len, arg);
514 if (strEQ(name + 0, "LOG_SYSLOG")) { /* removed */
522 if (!strnEQ(name + 0,"LOG_", 4))
524 return constant_LOG_U(name, len, arg);
526 if (strEQ(name + 0, "LOG_WARNING")) { /* removed */
543 MODULE = Sys::Syslog PACKAGE = Sys::Syslog
551 croak("Your vendor has not defined the Sys::Syslog macro _PATH_LOG");
564 croak("Your vendor has not defined the Sys::Syslog macro LOG_FAC");
577 croak("Your vendor has not defined the Sys::Syslog macro LOG_PRI");
589 RETVAL = LOG_MAKEPRI(fac,pri);
591 croak("Your vendor has not defined the Sys::Syslog macro LOG_MAKEPRI");
602 RETVAL = LOG_MASK(pri);
604 croak("Your vendor has not defined the Sys::Syslog macro LOG_MASK");
615 RETVAL = LOG_UPTO(pri);
617 croak("Your vendor has not defined the Sys::Syslog macro LOG_UPTO");
629 char * s = SvPV(sv, len);
632 RETVAL = constant(s,len,arg);