summaryrefslogtreecommitdiffstats
path: root/README
blob: b0f324365eecbdca0bbfbba3420a046578a39d2c (plain)
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
一、DMM compile

1.compile all module:
cd build
cmake -D DMM_DPDK_INSTALL_DIR=$DPDK_INSTALL_PATH ..
make -j 8

Note: DPDK_INSTALL_PATH - the path in which DPDK has been installed

libnStackAdpt.so, libnStackAPI.so, libsecurec.so will be copyed to release\lib64 folder.
declare_syscalls.h, nsocket_dmm_api.h will be copyed to release\include folder

configure files :
 release\configure
 module_config.json is the stack module config file.
 rd_config.json is the rd config file.
 the content of these two configure files just a simple.

2. run DMM
nStack DMM is just a library linked by APP, no need run any other.

for example: 
   gcc -g -o sendmsg sendmsg.c  -L./DMM/release/lib64 -lnStackAPI
   sendmsg.c is a APP that create a socket and connect to the service.
   run app:./sendmsg 192.168.1.10 1024 1
 
 module_config.json rd_config.json should be put together with sendmsg
 
  module_config.json for example:
   {
  "default_stack_name": "kernel",    /*when rd can't not be find maybe choose the defualt one*/
  "module_list": [
    {
      "stack_name": "kernel",
	  "function_name": "kernel_stack_register",
	  "libname": "",              /*library name, if loadtype is static, this maybe null, else must give a library name*/
	  "loadtype": "static",       /*library load type: static or dynamic*/
      "deploytype": "1",
      "maxfd": "1024",
	  "minfd": "0",
      "priorty": "1",
      "stackid": "0",   /*must be ordered and not be repeated*/
    }
    ]
    }
    
  rd_config.json for example:
    {
       "ip_route": [
       {
	     "subnet": "192.165.1.1/16",
	     "type": "nstack-kernel",     /*output interface type, nstack-kernel: indicate that this ip should go through linux protocol, nstack-dpdk: go through stackx protocol*/
       },
	   {
         "subnet": "192.167.1.1/16",
	     "type": "nstack-kernel",
       }
      ]
      "prot_route": [
      {
	     "proto_type": "11",
	     "type": "nstack-kernel",
      },
    }