Commit d341232c authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Aurelio Colosimo

include: checkpatch changes (and tabify 1588 structures)

This only applies checkpatch stuff, but I took the freedom to
add tabs to the stuctures in ieee1588_types.h, to make them more
readable.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 8ee159a4
......@@ -18,11 +18,11 @@ extern void pp_diag_error(struct pp_instance *ppi, int err);
extern void pp_diag_error_str2(struct pp_instance *ppi, char *s1, char *s2);
extern void pp_diag_fatal(struct pp_instance *ppi, char *s1, char *s2);
extern void pp_diag_printf(struct pp_instance *ppi, char *fmt, ...)
__attribute__((format(printf,2,3)));
__attribute__((format(printf, 2, 3)));
/* Our printf, that is implemented internally */
extern int pp_printf(const char *fmt, ...)
__attribute__((format(printf,1,2)));
__attribute__((format(printf, 1, 2)));
extern int pp_vsprintf(char *buf, const char *, va_list)
__attribute__ ((format (printf, 2, 0)));
......
......@@ -8,7 +8,6 @@
#include <stdint.h>
typedef enum {FALSE=0, TRUE} Boolean; /* FIXME really needed? */
typedef uint8_t Octet;
typedef int8_t Integer8;
......@@ -62,7 +61,7 @@ typedef struct {
typedef struct {
Enumeration16 networkProtocol;
UInteger16 adressLength;
Octet* adressField;
Octet *adressField;
} PortAdress;
typedef struct {
......@@ -74,12 +73,12 @@ typedef struct {
typedef struct {
Enumeration16 tlvType;
UInteger16 lengthField;
Octet* valueField;
Octet *valueField;
} TLV;
typedef struct {
UInteger8 lengthField;
Octet* textField;
Octet *textField;
} PTPText;
typedef struct {
......@@ -162,7 +161,7 @@ typedef struct {
/* Signaling Message (table 33, page 133) */
typedef struct {
PortIdentity targetPortIdentity;
char* tlv;
char *tlv;
} MsgSignaling;
/* Management Message (table 37, page 137) */
......@@ -171,7 +170,7 @@ typedef struct {
UInteger8 startingBoundaryHops;
UInteger8 boundaryHops;
Enumeration4 actionField;
char* tlv;
char *tlv;
} MsgManagement;
......@@ -288,7 +287,7 @@ enum ENNetworkProtocol {
};
/* Enumeration Time Source (table 7, page 57) */
enum ENTimeSource{
enum ENTimeSource {
ATOMIC_CLOCK = 0x10,
GPS = 0x20,
TERRESTRIAL_RADIO = 0x30,
......
......@@ -50,14 +50,12 @@ struct pp_runtime_opts {
* char *file; [PP_PATH_MAX]
*/
};
extern struct pp_runtime_opts default_rt_opts; /* preinitialized
* with default values */
extern struct pp_runtime_opts default_rt_opts; /* preinited with defaults */
/*
* Communication channel
*/
struct pp_channel
{
struct pp_channel {
union {
int fd; /* Posix wants fid descriptor */
void *custom; /* Other archs want other stuff */
......@@ -71,8 +69,7 @@ struct pp_channel
/*
* Foreign master record. Used to manage Foreign masters
*/
struct pp_frgn_master
{
struct pp_frgn_master {
PortIdentity port_identity;
UInteger16 ann_messages;
......@@ -84,8 +81,7 @@ struct pp_frgn_master
/*
* Timer
*/
struct pp_timer
{
struct pp_timer {
uint32_t start;
uint32_t interval;
};
......@@ -93,8 +89,7 @@ struct pp_timer
/*
* Net Path
*/
struct pp_net_path
{
struct pp_net_path {
struct pp_channel evt_ch;
struct pp_channel gen_ch;
Integer32 ucast_addr;
......@@ -167,11 +162,11 @@ struct pp_instance {
waiting_for_follow:1;
};
#define DSDEF(x) x->defaultDS
#define DSCUR(x) x->currentDS
#define DSPAR(x) x->parentDS
#define DSPOR(x) x->portDS
#define DSPRO(x) x->timePropertiesDS
#define DSDEF(x) ((x)->defaultDS)
#define DSCUR(x) ((x)->currentDS)
#define DSPAR(x) ((x)->parentDS)
#define DSPOR(x) ((x)->portDS)
#define DSPRO(x) ((x)->timePropertiesDS)
/* The channel for an instance must be created and possibly destroyed. */
......@@ -234,7 +229,7 @@ extern void msg_pack_pdelay_resp(void *buf, MsgHeader *hdr,
Timestamp *req_rec_tstamp, struct pp_instance *ppi);
extern void msg_unpack_pdelay_resp(void *buf, MsgPDelayResp *presp);
extern void msg_pack_pdelay_resp_followup(void *buf, MsgHeader *hdr,
Timestamp *resp_orig_tstamp, struct pp_instance* ppi);
Timestamp *resp_orig_tstamp, struct pp_instance *ppi);
extern void msg_unpack_pdelay_resp_followup(void *buf,
MsgPDelayRespFollowUp *presp_follow);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment