~ubuntu-branches/debian/sid/trinity/sid

« back to all changes in this revision

Viewing changes to net/proto-iucv.c

  • Committer: Package Import Robot
  • Author(s): gustavo panizzo
  • Date: 2014-01-17 21:10:15 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140117211015-k2qbnpu0osa5mlil
Tags: 1.3-1
* New upstream version 1.3.
* Removed wrong dependency on linux-headers. (Closes: #733771).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdlib.h>
 
2
#include "net.h"
 
3
#include "compat.h"
 
4
#include "utils.h"      // ARRAY_SIZE
 
5
 
 
6
#define SOL_IUCV 277
 
7
 
 
8
#define NR_SOL_IUCV_OPTS ARRAY_SIZE(iucv_opts)
 
9
static const unsigned int iucv_opts[] = {
 
10
        SO_IPRMDATA_MSG, SO_MSGLIMIT, SO_MSGSIZE };
 
11
 
 
12
void iucv_setsockopt(struct sockopt *so)
 
13
{
 
14
        unsigned char val;
 
15
 
 
16
        so->level = SOL_IUCV;
 
17
 
 
18
        val = rand() % NR_SOL_IUCV_OPTS;
 
19
        so->optname = iucv_opts[val];
 
20
 
 
21
        so->optval = sizeof(int);
 
22
}