2003-04-11 09:43:22 +00:00
|
|
|
/*
|
|
|
|
* Syslog functions.
|
2004-12-30 16:22:42 +00:00
|
|
|
* Copyright (C) 2003, 2004 Mondru AB.
|
2003-04-11 09:43:22 +00:00
|
|
|
*
|
|
|
|
* The contents of this file may be used under the terms of the GNU
|
|
|
|
* General Public License Version 2, provided that the above copyright
|
|
|
|
* notice and this permission notice is included in all copies or
|
|
|
|
* substantial portions of the software.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SYSERR_H
|
|
|
|
#define _SYSERR_H
|
|
|
|
|
2014-12-04 15:32:37 +00:00
|
|
|
#include <osmocom/core/logging.h>
|
2003-04-11 09:43:22 +00:00
|
|
|
|
2014-12-04 15:32:37 +00:00
|
|
|
enum {
|
|
|
|
DIP,
|
|
|
|
DTUN,
|
|
|
|
DGGSN,
|
|
|
|
DSGSN,
|
2017-08-08 21:27:22 +00:00
|
|
|
DICMP6,
|
2014-12-04 15:32:37 +00:00
|
|
|
};
|
2014-03-23 09:07:26 +00:00
|
|
|
|
2014-12-04 15:32:37 +00:00
|
|
|
#define SYS_ERR(sub, pri, en, fmt, args...) \
|
|
|
|
if (en) { \
|
|
|
|
logp2(sub, pri, __FILE__, __LINE__, 0, \
|
|
|
|
"errno=%d/%s " fmt "\n", en, strerror(en), \
|
|
|
|
##args); \
|
|
|
|
} else { \
|
|
|
|
logp2(sub, pri, __FILE__, __LINE__, 0, \
|
|
|
|
fmt "\n", ##args); \
|
|
|
|
}
|
|
|
|
|
|
|
|
extern const struct log_info log_info;
|
2003-04-11 09:43:22 +00:00
|
|
|
|
2011-11-02 12:06:18 +00:00
|
|
|
#endif /* !_SYSERR_H */
|