]> The Tcpdump Group git mirrors - tcpdump/blob - print-olsr.c
Fix a bunch of de-constifications.
[tcpdump] / print-olsr.c
1 /*
2 * Copyright (c) 1998-2007 The TCPDUMP project
3 * Copyright (c) 2009 Florian Forster
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code
7 * distributions retain the above copyright notice and this paragraph
8 * in its entirety, and (2) distributions including binary code include
9 * the above copyright notice and this paragraph in its entirety in
10 * the documentation or other materials provided with the distribution.
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
12 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
13 * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 * FOR A PARTICULAR PURPOSE.
15 *
16 * Optimized Link State Protocl (OLSR) as per rfc3626
17 *
18 * Original code by Hannes Gredler <hannes@juniper.net>
19 * IPv6 additions by Florian Forster <octo at verplant.org>
20 */
21
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25
26 #include <tcpdump-stdinc.h>
27
28 #include "interface.h"
29 #include "addrtoname.h"
30 #include "extract.h"
31
32 /*
33 * RFC 3626 common header
34 *
35 * 0 1 2 3
36 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
37 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
38 * | Packet Length | Packet Sequence Number |
39 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
40 * | Message Type | Vtime | Message Size |
41 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 * | Originator Address |
43 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
44 * | Time To Live | Hop Count | Message Sequence Number |
45 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
46 * | |
47 * : MESSAGE :
48 * | |
49 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
50 * | Message Type | Vtime | Message Size |
51 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
52 * | Originator Address |
53 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
54 * | Time To Live | Hop Count | Message Sequence Number |
55 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
56 * | |
57 * : MESSAGE :
58 * | |
59 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
60 * : :
61 */
62
63 struct olsr_common {
64 uint8_t packet_len[2];
65 uint8_t packet_seq[2];
66 };
67
68 #define OLSR_HELLO_MSG 1 /* rfc3626 */
69 #define OLSR_TC_MSG 2 /* rfc3626 */
70 #define OLSR_MID_MSG 3 /* rfc3626 */
71 #define OLSR_HNA_MSG 4 /* rfc3626 */
72 #define OLSR_POWERINFO_MSG 128
73 #define OLSR_NAMESERVICE_MSG 130
74 #define OLSR_HELLO_LQ_MSG 201 /* LQ extensions olsr.org */
75 #define OLSR_TC_LQ_MSG 202 /* LQ extensions olsr.org */
76
77 static const struct tok olsr_msg_values[] = {
78 { OLSR_HELLO_MSG, "Hello" },
79 { OLSR_TC_MSG, "TC" },
80 { OLSR_MID_MSG, "MID" },
81 { OLSR_HNA_MSG, "HNA" },
82 { OLSR_POWERINFO_MSG, "Powerinfo" },
83 { OLSR_NAMESERVICE_MSG, "Nameservice" },
84 { OLSR_HELLO_LQ_MSG, "Hello-LQ" },
85 { OLSR_TC_LQ_MSG, "TC-LQ" },
86 { 0, NULL}
87 };
88
89 struct olsr_msg4 {
90 uint8_t msg_type;
91 uint8_t vtime;
92 uint8_t msg_len[2];
93 uint8_t originator[4];
94 uint8_t ttl;
95 uint8_t hopcount;
96 uint8_t msg_seq[2];
97 };
98
99 struct olsr_msg6 {
100 uint8_t msg_type;
101 uint8_t vtime;
102 uint8_t msg_len[2];
103 uint8_t originator[16];
104 uint8_t ttl;
105 uint8_t hopcount;
106 uint8_t msg_seq[2];
107 };
108
109 struct olsr_hello {
110 uint8_t res[2];
111 uint8_t htime;
112 uint8_t will;
113 };
114
115 struct olsr_hello_link {
116 uint8_t link_code;
117 uint8_t res;
118 uint8_t len[2];
119 };
120
121 struct olsr_tc {
122 uint8_t ans_seq[2];
123 uint8_t res[2];
124 };
125
126 struct olsr_hna4 {
127 uint8_t network[4];
128 uint8_t mask[4];
129 };
130
131 struct olsr_hna6 {
132 uint8_t network[16];
133 uint8_t mask[16];
134 };
135
136
137 #define OLSR_EXTRACT_LINK_TYPE(link_code) (link_code & 0x3)
138 #define OLSR_EXTRACT_NEIGHBOR_TYPE(link_code) (link_code >> 2)
139
140 static const struct tok olsr_link_type_values[] = {
141 { 0, "Unspecified" },
142 { 1, "Asymmetric" },
143 { 2, "Symmetric" },
144 { 3, "Lost" },
145 { 0, NULL}
146 };
147
148 static const struct tok olsr_neighbor_type_values[] = {
149 { 0, "Not-Neighbor" },
150 { 1, "Symmetric" },
151 { 2, "Symmetric-MPR" },
152 { 0, NULL}
153 };
154
155 struct olsr_lq_neighbor4 {
156 uint8_t neighbor[4];
157 uint8_t link_quality;
158 uint8_t neighbor_link_quality;
159 uint8_t res[2];
160 };
161
162 struct olsr_lq_neighbor6 {
163 uint8_t neighbor[16];
164 uint8_t link_quality;
165 uint8_t neighbor_link_quality;
166 uint8_t res[2];
167 };
168
169 /*
170 * macro to convert the 8-bit mantissa/exponent to a double float
171 * taken from olsr.org.
172 */
173 #define VTIME_SCALE_FACTOR 0.0625
174 #define ME_TO_DOUBLE(me) \
175 (double)(VTIME_SCALE_FACTOR*(1+(double)(me>>4)/16)*(double)(1<<(me&0x0F)))
176
177 /*
178 * print a neighbor list with LQ extensions.
179 */
180 static int
181 olsr_print_lq_neighbor4(netdissect_options *ndo,
182 const u_char *msg_data, u_int hello_len)
183 {
184 const struct olsr_lq_neighbor4 *lq_neighbor;
185
186 while (hello_len >= sizeof(struct olsr_lq_neighbor4)) {
187
188 lq_neighbor = (const struct olsr_lq_neighbor4 *)msg_data;
189 if (!ND_TTEST(*lq_neighbor))
190 return (-1);
191
192 ND_PRINT((ndo, "\n\t neighbor %s, link-quality %.2lf%%"
193 ", neighbor-link-quality %.2lf%%",
194 ipaddr_string(ndo, lq_neighbor->neighbor),
195 ((double)lq_neighbor->link_quality/2.55),
196 ((double)lq_neighbor->neighbor_link_quality/2.55)));
197
198 msg_data += sizeof(struct olsr_lq_neighbor4);
199 hello_len -= sizeof(struct olsr_lq_neighbor4);
200 }
201 return (0);
202 }
203
204 #if INET6
205 static int
206 olsr_print_lq_neighbor6(netdissect_options *ndo,
207 const u_char *msg_data, u_int hello_len)
208 {
209 const struct olsr_lq_neighbor6 *lq_neighbor;
210
211 while (hello_len >= sizeof(struct olsr_lq_neighbor6)) {
212
213 lq_neighbor = (const struct olsr_lq_neighbor6 *)msg_data;
214 if (!ND_TTEST(*lq_neighbor))
215 return (-1);
216
217 ND_PRINT((ndo, "\n\t neighbor %s, link-quality %.2lf%%"
218 ", neighbor-link-quality %.2lf%%",
219 ip6addr_string(ndo, lq_neighbor->neighbor),
220 ((double)lq_neighbor->link_quality/2.55),
221 ((double)lq_neighbor->neighbor_link_quality/2.55)));
222
223 msg_data += sizeof(struct olsr_lq_neighbor6);
224 hello_len -= sizeof(struct olsr_lq_neighbor6);
225 }
226 return (0);
227 }
228 #endif /* INET6 */
229
230 /*
231 * print a neighbor list.
232 */
233 static int
234 olsr_print_neighbor(netdissect_options *ndo,
235 const u_char *msg_data, u_int hello_len)
236 {
237 int neighbor;
238
239 ND_PRINT((ndo, "\n\t neighbor\n\t\t"));
240 neighbor = 1;
241
242 while (hello_len >= sizeof(struct in_addr)) {
243
244 if (!ND_TTEST2(*msg_data, sizeof(struct in_addr)))
245 return (-1);
246 /* print 4 neighbors per line */
247
248 ND_PRINT((ndo, "%s%s", ipaddr_string(ndo, msg_data),
249 neighbor % 4 == 0 ? "\n\t\t" : " "));
250
251 msg_data += sizeof(struct in_addr);
252 hello_len -= sizeof(struct in_addr);
253 }
254 return (0);
255 }
256
257
258 void
259 olsr_print(netdissect_options *ndo,
260 const u_char *pptr, u_int length, int is_ipv6)
261 {
262 union {
263 const struct olsr_common *common;
264 const struct olsr_msg4 *msg4;
265 const struct olsr_msg6 *msg6;
266 const struct olsr_hello *hello;
267 const struct olsr_hello_link *hello_link;
268 const struct olsr_tc *tc;
269 const struct olsr_hna4 *hna;
270 } ptr;
271
272 u_int msg_type, msg_len, msg_tlen, hello_len;
273 uint16_t name_entry_type, name_entry_len;
274 u_int name_entry_padding;
275 uint8_t link_type, neighbor_type;
276 const u_char *tptr, *msg_data;
277
278 tptr = pptr;
279
280 if (length < sizeof(struct olsr_common)) {
281 goto trunc;
282 }
283
284 ND_TCHECK2(*tptr, sizeof(struct olsr_common));
285
286 ptr.common = (const struct olsr_common *)tptr;
287 length = min(length, EXTRACT_16BITS(ptr.common->packet_len));
288
289 ND_PRINT((ndo, "OLSRv%i, seq 0x%04x, length %u",
290 (is_ipv6 == 0) ? 4 : 6,
291 EXTRACT_16BITS(ptr.common->packet_seq),
292 length));
293
294 tptr += sizeof(struct olsr_common);
295
296 /*
297 * In non-verbose mode, just print version.
298 */
299 if (ndo->ndo_vflag < 1) {
300 return;
301 }
302
303 while (tptr < (pptr+length)) {
304 union
305 {
306 const struct olsr_msg4 *v4;
307 const struct olsr_msg6 *v6;
308 } msgptr;
309 int msg_len_valid = 0;
310
311 ND_TCHECK2(*tptr, sizeof(struct olsr_msg4));
312
313 #if INET6
314 if (is_ipv6)
315 {
316 msgptr.v6 = (const struct olsr_msg6 *) tptr;
317 msg_type = msgptr.v6->msg_type;
318 msg_len = EXTRACT_16BITS(msgptr.v6->msg_len);
319 if ((msg_len >= sizeof (struct olsr_msg6))
320 && (msg_len <= length))
321 msg_len_valid = 1;
322
323 /* infinite loop check */
324 if (msg_type == 0 || msg_len == 0) {
325 return;
326 }
327
328 ND_PRINT((ndo, "\n\t%s Message (%#04x), originator %s, ttl %u, hop %u"
329 "\n\t vtime %.3lfs, msg-seq 0x%04x, length %u%s",
330 tok2str(olsr_msg_values, "Unknown", msg_type),
331 msg_type, ip6addr_string(ndo, msgptr.v6->originator),
332 msgptr.v6->ttl,
333 msgptr.v6->hopcount,
334 ME_TO_DOUBLE(msgptr.v6->vtime),
335 EXTRACT_16BITS(msgptr.v6->msg_seq),
336 msg_len, (msg_len_valid == 0) ? " (invalid)" : ""));
337 if (!msg_len_valid) {
338 return;
339 }
340
341 msg_tlen = msg_len - sizeof(struct olsr_msg6);
342 msg_data = tptr + sizeof(struct olsr_msg6);
343 }
344 else /* (!is_ipv6) */
345 #endif /* INET6 */
346 {
347 msgptr.v4 = (const struct olsr_msg4 *) tptr;
348 msg_type = msgptr.v4->msg_type;
349 msg_len = EXTRACT_16BITS(msgptr.v4->msg_len);
350 if ((msg_len >= sizeof (struct olsr_msg4))
351 && (msg_len <= length))
352 msg_len_valid = 1;
353
354 /* infinite loop check */
355 if (msg_type == 0 || msg_len == 0) {
356 return;
357 }
358
359 ND_PRINT((ndo, "\n\t%s Message (%#04x), originator %s, ttl %u, hop %u"
360 "\n\t vtime %.3lfs, msg-seq 0x%04x, length %u%s",
361 tok2str(olsr_msg_values, "Unknown", msg_type),
362 msg_type, ipaddr_string(ndo, msgptr.v4->originator),
363 msgptr.v4->ttl,
364 msgptr.v4->hopcount,
365 ME_TO_DOUBLE(msgptr.v4->vtime),
366 EXTRACT_16BITS(msgptr.v4->msg_seq),
367 msg_len, (msg_len_valid == 0) ? " (invalid)" : ""));
368 if (!msg_len_valid) {
369 return;
370 }
371
372 msg_tlen = msg_len - sizeof(struct olsr_msg4);
373 msg_data = tptr + sizeof(struct olsr_msg4);
374 }
375
376 switch (msg_type) {
377 case OLSR_HELLO_MSG:
378 case OLSR_HELLO_LQ_MSG:
379 if (msg_tlen < sizeof(struct olsr_hello))
380 goto trunc;
381 ND_TCHECK2(*msg_data, sizeof(struct olsr_hello));
382
383 ptr.hello = (const struct olsr_hello *)msg_data;
384 ND_PRINT((ndo, "\n\t hello-time %.3lfs, MPR willingness %u",
385 ME_TO_DOUBLE(ptr.hello->htime), ptr.hello->will));
386 msg_data += sizeof(struct olsr_hello);
387 msg_tlen -= sizeof(struct olsr_hello);
388
389 while (msg_tlen >= sizeof(struct olsr_hello_link)) {
390 int hello_len_valid = 0;
391
392 /*
393 * link-type.
394 */
395 ND_TCHECK2(*msg_data, sizeof(struct olsr_hello_link));
396
397 ptr.hello_link = (const struct olsr_hello_link *)msg_data;
398
399 hello_len = EXTRACT_16BITS(ptr.hello_link->len);
400 link_type = OLSR_EXTRACT_LINK_TYPE(ptr.hello_link->link_code);
401 neighbor_type = OLSR_EXTRACT_NEIGHBOR_TYPE(ptr.hello_link->link_code);
402
403 if ((hello_len <= msg_tlen)
404 && (hello_len >= sizeof(struct olsr_hello_link)))
405 hello_len_valid = 1;
406
407 ND_PRINT((ndo, "\n\t link-type %s, neighbor-type %s, len %u%s",
408 tok2str(olsr_link_type_values, "Unknown", link_type),
409 tok2str(olsr_neighbor_type_values, "Unknown", neighbor_type),
410 hello_len,
411 (hello_len_valid == 0) ? " (invalid)" : ""));
412
413 if (hello_len_valid == 0)
414 break;
415
416 msg_data += sizeof(struct olsr_hello_link);
417 msg_tlen -= sizeof(struct olsr_hello_link);
418 hello_len -= sizeof(struct olsr_hello_link);
419
420 ND_TCHECK2(*msg_data, hello_len);
421 if (msg_type == OLSR_HELLO_MSG) {
422 if (olsr_print_neighbor(ndo, msg_data, hello_len) == -1)
423 goto trunc;
424 } else {
425 #if INET6
426 if (is_ipv6) {
427 if (olsr_print_lq_neighbor6(ndo, msg_data, hello_len) == -1)
428 goto trunc;
429 } else
430 #endif
431 {
432 if (olsr_print_lq_neighbor4(ndo, msg_data, hello_len) == -1)
433 goto trunc;
434 }
435 }
436
437 msg_data += hello_len;
438 msg_tlen -= hello_len;
439 }
440 break;
441
442 case OLSR_TC_MSG:
443 case OLSR_TC_LQ_MSG:
444 if (msg_tlen < sizeof(struct olsr_tc))
445 goto trunc;
446 ND_TCHECK2(*msg_data, sizeof(struct olsr_tc));
447
448 ptr.tc = (const struct olsr_tc *)msg_data;
449 ND_PRINT((ndo, "\n\t advertised neighbor seq 0x%04x",
450 EXTRACT_16BITS(ptr.tc->ans_seq)));
451 msg_data += sizeof(struct olsr_tc);
452 msg_tlen -= sizeof(struct olsr_tc);
453
454 if (msg_type == OLSR_TC_MSG) {
455 if (olsr_print_neighbor(ndo, msg_data, msg_tlen) == -1)
456 goto trunc;
457 } else {
458 #if INET6
459 if (is_ipv6) {
460 if (olsr_print_lq_neighbor6(ndo, msg_data, msg_tlen) == -1)
461 goto trunc;
462 } else
463 #endif
464 {
465 if (olsr_print_lq_neighbor4(ndo, msg_data, msg_tlen) == -1)
466 goto trunc;
467 }
468 }
469 break;
470
471 case OLSR_MID_MSG:
472 {
473 size_t addr_size = sizeof(struct in_addr);
474
475 #if INET6
476 if (is_ipv6)
477 addr_size = sizeof(struct in6_addr);
478 #endif
479
480 while (msg_tlen >= addr_size) {
481 ND_TCHECK2(*msg_data, addr_size);
482 #if INET6
483 ND_PRINT((ndo, "\n\t interface address %s",
484 is_ipv6 ? ip6addr_string(ndo, msg_data) :
485 ipaddr_string(ndo, msg_data)));
486 #else
487 ND_PRINT((ndo, "\n\t interface address %s",
488 ipaddr_string(ndo, msg_data)));
489 #endif
490
491 msg_data += addr_size;
492 msg_tlen -= addr_size;
493 }
494 break;
495 }
496
497 case OLSR_HNA_MSG:
498 ND_PRINT((ndo, "\n\t Advertised networks (total %u)",
499 (unsigned int) (msg_tlen / sizeof(struct olsr_hna6))));
500 #if INET6
501 if (is_ipv6)
502 {
503 int i = 0;
504 while (msg_tlen >= sizeof(struct olsr_hna6)) {
505 const struct olsr_hna6 *hna6;
506
507 ND_TCHECK2(*msg_data, sizeof(struct olsr_hna6));
508
509 hna6 = (const struct olsr_hna6 *)msg_data;
510
511 ND_PRINT((ndo, "\n\t #%i: %s/%u",
512 i, ip6addr_string(ndo, hna6->network),
513 mask62plen (hna6->mask)));
514
515 msg_data += sizeof(struct olsr_hna6);
516 msg_tlen -= sizeof(struct olsr_hna6);
517 }
518 }
519 else
520 #endif
521 {
522 int col = 0;
523 while (msg_tlen >= sizeof(struct olsr_hna4)) {
524 ND_TCHECK2(*msg_data, sizeof(struct olsr_hna4));
525
526 ptr.hna = (const struct olsr_hna4 *)msg_data;
527
528 /* print 4 prefixes per line */
529 ND_PRINT((ndo, "%s%s/%u",
530 col == 0 ? "\n\t " : ", ",
531 ipaddr_string(ndo, ptr.hna->network),
532 mask2plen(EXTRACT_32BITS(ptr.hna->mask))));
533
534 msg_data += sizeof(struct olsr_hna4);
535 msg_tlen -= sizeof(struct olsr_hna4);
536
537 col = (col + 1) % 4;
538 }
539 }
540 break;
541
542 case OLSR_NAMESERVICE_MSG:
543 {
544 u_int name_entries = EXTRACT_16BITS(msg_data+2);
545 u_int addr_size = 4;
546 int name_entries_valid = 0;
547 u_int i;
548
549 if (is_ipv6)
550 addr_size = 16;
551
552 if ((name_entries > 0)
553 && ((name_entries * (4 + addr_size)) <= msg_tlen))
554 name_entries_valid = 1;
555
556 if (msg_tlen < 4)
557 goto trunc;
558 ND_TCHECK2(*msg_data, 4);
559
560 ND_PRINT((ndo, "\n\t Version %u, Entries %u%s",
561 EXTRACT_16BITS(msg_data),
562 name_entries, (name_entries_valid == 0) ? " (invalid)" : ""));
563
564 if (name_entries_valid == 0)
565 break;
566
567 msg_data += 4;
568 msg_tlen -= 4;
569
570 for (i = 0; i < name_entries; i++) {
571 int name_entry_len_valid = 0;
572
573 if (msg_tlen < 4)
574 break;
575 ND_TCHECK2(*msg_data, 4);
576
577 name_entry_type = EXTRACT_16BITS(msg_data);
578 name_entry_len = EXTRACT_16BITS(msg_data+2);
579
580 msg_data += 4;
581 msg_tlen -= 4;
582
583 if ((name_entry_len > 0) && ((addr_size + name_entry_len) <= msg_tlen))
584 name_entry_len_valid = 1;
585
586 ND_PRINT((ndo, "\n\t #%u: type %#06x, length %u%s",
587 (unsigned int) i, name_entry_type,
588 name_entry_len, (name_entry_len_valid == 0) ? " (invalid)" : ""));
589
590 if (name_entry_len_valid == 0)
591 break;
592
593 /* 32-bit alignment */
594 name_entry_padding = 0;
595 if (name_entry_len%4 != 0)
596 name_entry_padding = 4-(name_entry_len%4);
597
598 if (msg_tlen < addr_size + name_entry_len + name_entry_padding)
599 goto trunc;
600
601 ND_TCHECK2(*msg_data, addr_size + name_entry_len + name_entry_padding);
602
603 #if INET6
604 if (is_ipv6)
605 ND_PRINT((ndo, ", address %s, name \"",
606 ip6addr_string(ndo, msg_data)));
607 else
608 #endif
609 ND_PRINT((ndo, ", address %s, name \"",
610 ipaddr_string(ndo, msg_data)));
611 (void)fn_printn(ndo, msg_data + addr_size, name_entry_len, NULL);
612 ND_PRINT((ndo, "\""));
613
614 msg_data += addr_size + name_entry_len + name_entry_padding;
615 msg_tlen -= addr_size + name_entry_len + name_entry_padding;
616 } /* for (i = 0; i < name_entries; i++) */
617 break;
618 } /* case OLSR_NAMESERVICE_MSG */
619
620 /*
621 * FIXME those are the defined messages that lack a decoder
622 * you are welcome to contribute code ;-)
623 */
624 case OLSR_POWERINFO_MSG:
625 default:
626 print_unknown_data(ndo, msg_data, "\n\t ", msg_tlen);
627 break;
628 } /* switch (msg_type) */
629 tptr += msg_len;
630 } /* while (tptr < (pptr+length)) */
631
632 return;
633
634 trunc:
635 ND_PRINT((ndo, "[|olsr]"));
636 }
637
638 /*
639 * Local Variables:
640 * c-style: whitesmith
641 * c-basic-offset: 4
642 * End:
643 */