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

« back to all changes in this revision

Viewing changes to net/proto-rxrpc.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_RXRPC 272
 
7
 
 
8
#define NR_SOL_RXRPC_OPTS ARRAY_SIZE(rxrpc_opts)
 
9
static const unsigned int rxrpc_opts[] = {
 
10
        RXRPC_USER_CALL_ID, RXRPC_ABORT, RXRPC_ACK, RXRPC_NET_ERROR,
 
11
        RXRPC_BUSY, RXRPC_LOCAL_ERROR, RXRPC_NEW_CALL, RXRPC_ACCEPT };
 
12
 
 
13
void rxrpc_setsockopt(struct sockopt *so)
 
14
{
 
15
        unsigned char val;
 
16
 
 
17
        so->level = SOL_RXRPC;
 
18
 
 
19
        val = rand() % NR_SOL_RXRPC_OPTS;
 
20
        so->optname = rxrpc_opts[val];
 
21
}