File: slp.c

package info (click to toggle)
pilot-link 0.12.5-dfsg-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 6,868 kB
  • ctags: 5,811
  • sloc: ansic: 53,153; sh: 10,459; java: 2,584; perl: 2,247; python: 1,044; makefile: 991; yacc: 662; cpp: 551; xml: 39
file content (657 lines) | stat: -rw-r--r-- 17,506 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
/*
 * $Id: slp.c,v 1.56 2006/10/13 09:52:13 fpillet Exp $
 *
 * slp.c:  Pilot SLP protocol
 *
 * (c) 1996, D. Jeff Dionne.
 * Much of this code adapted from Brian J. Swetland <swetland@uiuc.edu>
 * Additional work Copyright (c) 2005, Florent Pillet
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Library General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
 * General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>

#include "pi-debug.h"
#include "pi-source.h"
#include "pi-serial.h"
#include "pi-slp.h"
#include "pi-error.h"

/* Declare function prototypes */
static int slp_flush(pi_socket_t *ps, int flags);
static int slp_getsockopt(pi_socket_t *ps, int level, int option_name, 
			  void *option_value, size_t *option_len);
static int slp_setsockopt(pi_socket_t *ps, int level, int option_name, 
			  const void *option_value, size_t *option_len);


/***********************************************************************
 *
 * Function:    slp_protocol_dup
 *
 * Summary:     clones an existing pi_protocol struct
 *
 * Parameters:  pi_protocol_t*
 *
 * Returns:     pi_protocol_t* or NULL if operation failed
 *
 ***********************************************************************/
static pi_protocol_t*
slp_protocol_dup (pi_protocol_t *prot)
{
	pi_protocol_t *new_prot;

	struct	pi_slp_data	*data,
				*new_data;
	
	new_prot = (pi_protocol_t *)malloc (sizeof (pi_protocol_t));
	new_data = (struct pi_slp_data *)malloc (sizeof (struct pi_slp_data));

	if (new_prot != NULL && new_data != NULL) {
		new_prot->level	= prot->level;
		new_prot->dup 	= prot->dup;
		new_prot->free 	= prot->free;
		new_prot->read 	= prot->read;
		new_prot->write	= prot->write;
		new_prot->flush = prot->flush;
		new_prot->getsockopt = prot->getsockopt;
		new_prot->setsockopt = prot->setsockopt;

		data = (struct pi_slp_data *)prot->data;
	
		new_data->dest 	= data->dest;
		new_data->last_dest = data->last_dest;	
		new_data->src 	= data->src;
		new_data->last_src = data->last_src;
		new_data->type 	= data->type;
		new_data->last_type = data->last_type;
		new_data->txid 	= data->txid;
		new_data->last_txid = data->last_txid;

		new_prot->data 	= new_data;

	} else if (new_prot != NULL) {
		free(new_prot);
		new_prot = NULL;
	} else if (new_data != NULL) {
		free(new_data);
		new_data = NULL;
	}

	return new_prot;
}


/***********************************************************************
 *
 * Function:    slp_protocol_free
 *
 * Summary:     frees an existing pi_protocol struct
 *
 * Parameters:  pi_protocol_t*
 *
 * Returns:     void
 *
 ***********************************************************************/
static void
slp_protocol_free (pi_protocol_t *prot)
{
	if (prot != NULL) {
		if (prot->data != NULL)
			free(prot->data);
		free(prot);
	}
}


/***********************************************************************
 *
 * Function:    slp_protocol
 *
 * Summary:     creates a pi_protocol struct instance
 *
 * Parameters:  pi_protocol_t*
 *
 * Returns:     pi_protocol_t* or NULL if operation failed
 *
 ***********************************************************************/
pi_protocol_t*
slp_protocol (void)
{
	pi_protocol_t *prot;
	struct 	pi_slp_data *data;

	prot 	= (pi_protocol_t *)malloc (sizeof (pi_protocol_t));
	data 	= (struct pi_slp_data *)malloc (sizeof (struct pi_slp_data));

	if (prot != NULL && data != NULL) {
		prot->level = PI_LEVEL_SLP;
		prot->dup = slp_protocol_dup;
		prot->free = slp_protocol_free;
		prot->read = slp_rx;
		prot->write = slp_tx;
		prot->flush = slp_flush;
		prot->getsockopt = slp_getsockopt;
		prot->setsockopt = slp_setsockopt;

		data->dest = PI_SLP_SOCK_DLP;
		data->last_dest	= -1;	
		data->src = PI_SLP_SOCK_DLP;
		data->last_src 	= -1;
		data->type = PI_SLP_TYPE_PADP;
		data->last_type	= -1;
		data->txid = 0xfe;
		data->last_txid	= 0xff;
		prot->data = data;

	} else if (prot != NULL) {
		free(prot);
		prot = NULL;
	} else if (data != NULL) {
		free(data);
		data = NULL;
	}
	
	return prot;
}


/***********************************************************************
 *
 * Function:    slp_tx
 *
 * Summary:     Build and queue up an SLP packet to be transmitted
 *
 * Parameters:  None
 *
 * Returns:     A negative number on error, 0 otherwise
 *
 ***********************************************************************/
ssize_t
slp_tx(pi_socket_t *ps, const unsigned char *buf, size_t len, int flags)
{
	int 	bytes;
	pi_protocol_t	*prot,
			*next;
	struct 	pi_slp_data *data;
	struct 	slp *slp;
	unsigned char *slp_buf;
	unsigned int	i,
			n;

	prot = pi_protocol(ps->sd, PI_LEVEL_SLP);
	if (prot == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	data = (struct pi_slp_data *)prot->data;
	next = pi_protocol_next(ps->sd, PI_LEVEL_SLP);
	if (next == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	slp_buf = (unsigned char *) malloc (PI_SLP_HEADER_LEN +
		PI_SLP_MTU + PI_SLP_FOOTER_LEN);
	if (slp_buf == NULL)
		return pi_set_error(ps->sd, PI_ERR_GENERIC_MEMORY);

	slp = (struct slp *) slp_buf;

	/* Header values */
	slp->_be 	= 0xbe;
	slp->_ef 	= 0xef;
	slp->_ed 	= 0xed;
	slp->dest 	= data->dest;
	slp->src 	= data->src;
	slp->type 	= data->type;
	set_short(&slp->dlen, len);
	slp->id_ 	= data->txid;

	for (n = i = 0; i < 9; i++)
		n += slp_buf[i];
	slp->csum = 0xff & n;

	/* Copy in the packet data */
	memcpy (slp_buf + PI_SLP_HEADER_LEN, buf, len);

	/* CRC value */
	set_short(&slp_buf[PI_SLP_HEADER_LEN + len],
		crc16(slp_buf, (int)(PI_SLP_HEADER_LEN + len)));

	/* Write out the data */
	bytes = next->write(ps, slp_buf,
		PI_SLP_HEADER_LEN + len + PI_SLP_FOOTER_LEN, flags);

	if (bytes >= 0) {
		CHECK(PI_DBG_SLP, PI_DBG_LVL_INFO, slp_dump_header(slp_buf, 1));
		CHECK(PI_DBG_SLP, PI_DBG_LVL_DEBUG, slp_dump(slp_buf));
	}
	
	free (slp_buf);

	return bytes;
}

/* Sigh.  SLP is a really broken protocol.  It has no proper framing, so it
   makes a proper "device driver" layer impossible.  There ought to be a
   layer below SLP that reads frames off the wire and passes them up. 
   Instead, all we can do is have the device driver give us bytes and SLP has
   to keep a pile of status info while it builds frames for itself.  So
   here's the code that does that. */

/***********************************************************************
 *
 * Function:    slp_rx
 *
 * Summary:     Accept SLP packets on the wire
 *
 * Parameters:  None
 *
 * Returns:     packet length or negative on error
 *
 ***********************************************************************/
ssize_t
slp_rx(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags)
{
	int 	i,
		computed_crc,
		received_crc,
		b1, 
		b2, 
		b3,	
		state,
		expect 		= 0,
		packet_len,
		bytes;
	unsigned char
		header_checksum;
	pi_protocol_t	*prot,
			*next;
	pi_buffer_t *slp_buf;
	struct 	pi_slp_data *data;

	LOG((PI_DBG_SLP, PI_DBG_LVL_DEBUG, "SLP RX len=%d flags=0x%04x\n",
		len, flags));

	prot = pi_protocol(ps->sd, PI_LEVEL_SLP);
	if (prot == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	data = (struct pi_slp_data *)prot->data;
	next = pi_protocol_next(ps->sd, PI_LEVEL_SLP);
	if (next == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	slp_buf = pi_buffer_new (PI_SLP_HEADER_LEN + PI_SLP_MTU + PI_SLP_FOOTER_LEN);
	if (slp_buf == NULL) {
		errno = ENOMEM;
		return pi_set_error(ps->sd, PI_ERR_GENERIC_MEMORY);
	}

	state 		= 0;
	packet_len	= 0;

	for (;;) {
		switch (state) {		
		case 0:
			expect = 3;
			state++;
			break;

		case 1:
			b1 = slp_buf->data[PI_SLP_OFFSET_SIG1];
			b2 = slp_buf->data[PI_SLP_OFFSET_SIG2];
			b3 = slp_buf->data[PI_SLP_OFFSET_SIG3];
			if (b1 == PI_SLP_SIG_BYTE1 &&
			    b2 == PI_SLP_SIG_BYTE2 &&
			    b3 == PI_SLP_SIG_BYTE3) {
				state++;
				expect = PI_SLP_HEADER_LEN - 3;
			} else {
				slp_buf->data[PI_SLP_OFFSET_SIG1] = slp_buf->data[PI_SLP_OFFSET_SIG2];
				slp_buf->data[PI_SLP_OFFSET_SIG2] = slp_buf->data[PI_SLP_OFFSET_SIG3];
				expect = 1;
				slp_buf->used = 2;
				LOG((PI_DBG_SLP, PI_DBG_LVL_WARN,
					"SLP RX Unexpected signature"
					" 0x%.2x 0x%.2x 0x%.2x\n",
					b1, b2, b3));
			}
			break;

		case 2:
			/* Addition check sum for header */
			for (header_checksum = i = 0; i < 9; i++)
				header_checksum += slp_buf->data[i];

			/* read in the whole SLP header. */
			if (header_checksum == slp_buf->data[PI_SLP_OFFSET_SUM]) {
				state++;
				packet_len = get_short(&slp_buf->data[PI_SLP_OFFSET_SIZE]);
				if (packet_len > (int)len) {
					LOG((PI_DBG_SLP, PI_DBG_LVL_ERR,
						"SLP RX Packet size exceed buffer\n"));
					pi_buffer_free (slp_buf);
					return pi_set_error(ps->sd, PI_ERR_PROT_BADPACKET);
				}
				expect = packet_len;
			} else {
				LOG((PI_DBG_SLP, PI_DBG_LVL_WARN,
					"SLP RX Header checksum failed for header:\n"));
				pi_dumpdata((const char *)slp_buf->data, PI_SLP_HEADER_LEN);
				pi_buffer_free (slp_buf);
				return 0;
			}
			break;

		case 3:
			state++;
			expect = PI_SLP_FOOTER_LEN;
			break;

		case 4:
			/* that should be the whole packet. */
			computed_crc = crc16(slp_buf->data, PI_SLP_HEADER_LEN + packet_len);
			received_crc = get_short(&slp_buf->data[PI_SLP_HEADER_LEN + packet_len]);
			if (get_byte(&slp_buf->data[PI_SLP_OFFSET_TYPE]) == PI_SLP_TYPE_LOOP) {
				/* Adjust because every tenth loopback
				 * packet has a bogus check sum */
				if (computed_crc != received_crc)
					computed_crc |= 0x00e0;
			}
			if (computed_crc != received_crc) {
				LOG((PI_DBG_SLP, PI_DBG_LVL_ERR,
				    "SLP RX packet crc failed: "
				    "computed=0x%.4x received=0x%.4x\n",
				    computed_crc, received_crc));
				pi_buffer_free (slp_buf);
				return 0;
			}
			
			/* Track the info so getsockopt will work */
			data->last_dest = get_byte(&slp_buf->data[PI_SLP_OFFSET_DEST]);
			data->last_src 	= get_byte(&slp_buf->data[PI_SLP_OFFSET_SRC]);
			data->last_type = get_byte(&slp_buf->data[PI_SLP_OFFSET_TYPE]);
			data->last_txid = get_byte(&slp_buf->data[PI_SLP_OFFSET_TXID]);

			CHECK(PI_DBG_SLP, PI_DBG_LVL_INFO, slp_dump_header(slp_buf->data, 0));
			CHECK(PI_DBG_SLP, PI_DBG_LVL_DEBUG, slp_dump(slp_buf->data));

			if (pi_buffer_append (buf, &slp_buf->data[PI_SLP_HEADER_LEN], packet_len) == NULL) {
				errno = ENOMEM;
				return pi_set_error(ps->sd, PI_ERR_GENERIC_MEMORY);
			}
			pi_buffer_free (slp_buf);
			return packet_len;

		default:
			break;
		}
		
		do {
			bytes = next->read(ps, slp_buf, (size_t)expect, flags);
			if (bytes < 0) {
				LOG((PI_DBG_SLP, PI_DBG_LVL_ERR,
				    "SLP RX Read Error %d\n",
				    bytes));
				pi_buffer_free (slp_buf);
				return bytes;
			}
			expect -= bytes;
		} while (expect > 0);
	}
}

/***********************************************************************
 *
 * Function:    slp_flush
 *
 * Summary:     Flush input and output buffers
 *
 * Parameters:  pi_socket_t*, flags
 *
 * Returns:     A negative number on error, 0 otherwise
 *
 ***********************************************************************/
static int
slp_flush(pi_socket_t *ps, int flags)
{
	pi_protocol_t	*prot,
			*next;

	prot = pi_protocol(ps->sd, PI_LEVEL_SLP);
	if (prot == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	next = pi_protocol_next(ps->sd, PI_LEVEL_SLP);
	if (next == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	return next->flush(ps, flags);
}

/***********************************************************************
 *
 * Function:    slp_getsockopt
 *
 * Summary:     get options on socket
 *
 * Parameters:  pi_socket*, level, option name, option value, option length
 *
 * Returns:     0 for success, negative otherwise
 *
 ***********************************************************************/
static int
slp_getsockopt(pi_socket_t *ps, int level, int option_name, 
       void *option_value, size_t *option_len)
{
	pi_protocol_t *prot;
	struct 	pi_slp_data *data;

	prot = pi_protocol(ps->sd, PI_LEVEL_SLP);
	if (prot == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);

	data = (struct pi_slp_data *)prot->data;

	switch (option_name) {
		case PI_SLP_DEST:
			if (*option_len < sizeof (data->dest))
				goto error;
			memcpy (option_value, &data->dest, sizeof (data->dest));
			*option_len = sizeof (data->dest);
			break;
		case PI_SLP_LASTDEST:
			if (*option_len < sizeof (data->dest))
				goto error;
			memcpy (option_value, &data->last_dest,
					sizeof (data->last_dest));
			*option_len = sizeof (data->last_dest);
			break;
		case PI_SLP_SRC:
			if (*option_len < sizeof (data->src))
				goto error;
			memcpy (option_value, &data->src, 
					sizeof (data->src));
			*option_len = sizeof (data->src);
			break;
		case PI_SLP_LASTSRC:
			if (*option_len < sizeof (data->last_src))
				goto error;
			memcpy (option_value, &data->last_src, 
					sizeof (data->last_src));
			*option_len = sizeof (data->last_src);
			break;
		case PI_SLP_TYPE:
			if (*option_len < sizeof (data->type))
				goto error;
			memcpy (option_value, &data->type,
					sizeof (data->type));
			*option_len = sizeof (data->type);
			break;
		case PI_SLP_LASTTYPE:
			if (*option_len < sizeof (data->last_type))
				goto error;
			memcpy (option_value, &data->last_type,
					sizeof (data->last_type));
			*option_len = sizeof (data->last_type);
			break;
		case PI_SLP_TXID:
			if (*option_len < sizeof (data->txid))
				goto error;
			memcpy (option_value, &data->txid,
					sizeof (data->txid));
			*option_len = sizeof (data->txid);
			break;
		case PI_SLP_LASTTXID:
			if (*option_len < sizeof (data->last_txid))
				goto error;
			memcpy (option_value, &data->last_txid,
					sizeof (data->last_txid));
			*option_len = sizeof (data->last_txid);
			break;
	}
	
	return 0;
	
 error:
	errno = EINVAL;
	return pi_set_error(ps->sd, PI_ERR_GENERIC_ARGUMENT);
}


/***********************************************************************
 *
 * Function:    slp_setsockopt
 *
 * Summary:     set options on socket
 *
 * Parameters:  pi_socket*, level, option name, option value, option length
 *
 * Returns:     0 for success, negative otherwise
 *
 ***********************************************************************/
static int
slp_setsockopt(pi_socket_t *ps, int level, int option_name, 
       const void *option_value, size_t *option_len)
{
	pi_protocol_t *prot;
	struct 	pi_slp_data *data;

	prot = pi_protocol(ps->sd, PI_LEVEL_SLP);
	if (prot == NULL)
		return pi_set_error(ps->sd, PI_ERR_SOCK_INVALID);
	data = (struct pi_slp_data *)prot->data;

	switch (option_name) {
		case PI_SLP_DEST:
			if (*option_len != sizeof (data->dest))
				goto error;
			memcpy (&data->dest, option_value,
					sizeof (data->dest));
			*option_len = sizeof (data->dest);
			break;
		case PI_SLP_SRC:
			if (*option_len != sizeof (data->src))
				goto error;
			memcpy (&data->src, option_value,
					sizeof (data->src));
			*option_len = sizeof (data->src);
			break;
		case PI_SLP_TYPE:
			if (*option_len != sizeof (data->type))
				goto error;
			memcpy (&data->type, option_value,
					sizeof (data->type));
			*option_len = sizeof (data->type);
			break;
		case PI_SLP_TXID:
			if (*option_len != sizeof (data->txid))
				goto error;
			memcpy (&data->txid, option_value,
					sizeof (data->txid));
			*option_len = sizeof (data->txid);
			break;
	}
	
	return 0;
	
 error:
	errno = EINVAL;
	return pi_set_error(ps->sd, PI_ERR_GENERIC_ARGUMENT);
}


/***********************************************************************
 *
 * Function:    slp_dump_header
 *
 * Summary:     Dump the contents of the SPL frame header
 *
 * Parameters:  char* to data buffer, RXTX flag
 *
 * Returns:     void
 *
 ***********************************************************************/
void
slp_dump_header(const unsigned char *data, int rxtx)
{	
	LOG((PI_DBG_SLP, PI_DBG_LVL_NONE,
	    "SLP %s %d->%d type=%d txid=0x%.2x len=0x%.4x checksum=0x%.2x\n",
	    rxtx ? "TX" : "RX",
	    get_byte(&data[PI_SLP_OFFSET_DEST]),
	    get_byte(&data[PI_SLP_OFFSET_SRC]),
	    get_byte(&data[PI_SLP_OFFSET_TYPE]),
	    get_byte(&data[PI_SLP_OFFSET_TXID]),
	    get_short(&data[PI_SLP_OFFSET_SIZE]),
	    get_byte(&data[PI_SLP_OFFSET_SUM])));
}


/***********************************************************************
 *
 * Function:    slp_dump
 *
 * Summary:     Dump the contents of the SPL frame
 *
 * Parameters:  char* to data buffer
 *
 * Returns:     void
 *
 ***********************************************************************/
void
slp_dump(const unsigned char *data)
{
	pi_dumpdata((char *)&data[PI_SLP_HEADER_LEN], get_short(&data[PI_SLP_OFFSET_SIZE]));
}

/* vi: set ts=8 sw=4 sts=4 noexpandtab: cin */
/* ex: set tabstop=4 expandtab: */
/* Local Variables: */
/* indent-tabs-mode: t */
/* c-basic-offset: 8 */
/* End: */