Skip to content

Commit d8cd8ac

Browse files
committed
[init] init a ns-3 repository
0 parents  commit d8cd8ac

File tree

3,652 files changed

+1181822
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,652 files changed

+1181822
-0
lines changed

.clang-format

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Microsoft
4+
5+
AllowAllArgumentsOnNextLine: false
6+
AllowAllParametersOfDeclarationOnNextLine: false
7+
AlwaysBreakAfterReturnType: TopLevelDefinitions
8+
AlwaysBreakTemplateDeclarations: Yes
9+
BinPackArguments: false
10+
BinPackParameters: false
11+
ColumnLimit: 100
12+
DeriveLineEnding: false
13+
IncludeBlocks: Regroup
14+
IncludeCategories:
15+
- Regex: '^(<|")ns3/'
16+
Priority: 2
17+
SortPriority: 0
18+
- Regex: "^<"
19+
Priority: 3
20+
SortPriority: 0
21+
- Regex: ".*"
22+
Priority: 1
23+
SortPriority: 0
24+
KeepEmptyLinesAtTheStartOfBlocks: false
25+
PackConstructorInitializers: Never
26+
PointerAlignment: Left
27+
QualifierAlignment: Left
28+
SeparateDefinitionBlocks: Always
29+
Standard: "c++17"

.clang-tidy

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Checks: >
2+
-*,
3+
bugprone-argument-comment,
4+
bugprone-bool-pointer-implicit-conversion,
5+
bugprone-inaccurate-erase,
6+
bugprone-move-forwarding-reference,
7+
bugprone-redundant-branch-condition,
8+
bugprone-string-constructor,
9+
bugprone-string-integer-assignment,
10+
bugprone-suspicious-memset-usage,
11+
bugprone-suspicious-semicolon,
12+
bugprone-suspicious-string-compare,
13+
bugprone-terminating-continue,
14+
bugprone-too-small-loop-variable,
15+
bugprone-virtual-near-miss,
16+
misc-redundant-expression,
17+
misc-static-assert,
18+
modernize-make-shared,
19+
modernize-make-unique,
20+
modernize-redundant-void-arg,
21+
modernize-use-emplace,
22+
modernize-use-equals-delete,
23+
modernize-use-nullptr,
24+
modernize-use-override,
25+
performance-faster-string-find,
26+
performance-for-range-copy,
27+
performance-implicit-conversion-in-loop,
28+
performance-inefficient-algorithm,
29+
performance-inefficient-vector-operation,
30+
performance-trivially-destructible,
31+
readability-braces-around-statements,
32+
readability-duplicate-include,
33+
readability-isolate-declaration,
34+
readability-misplaced-array-index,
35+
readability-redundant-control-flow,
36+
readability-redundant-function-ptr-dereference,
37+
readability-redundant-smartptr-get,
38+
readability-redundant-string-cstr,
39+
readability-simplify-subscript-expr,
40+
readability-static-definition-in-anonymous-namespace,
41+
readability-string-compare,
42+
readability-uppercase-literal-suffix,
43+
44+
FormatStyle: "file"
45+
HeaderFilterRegex: ".*h$"

.editorconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# EditorConfig
2+
#
3+
# This file configures indentation styles for source files in
4+
# supporting editors.
5+
#
6+
# See https://editorconfig.org/ for more.
7+
8+
# Do not search for additional .editorconfig files above this
9+
# directory.
10+
root = true
11+
12+
[*]
13+
end_of_line = lf # Unix-style newlines
14+
charset = utf-8 # All files are in UTF-8
15+
insert_final_newline = true # All files end with a newline
16+
trim_trailing_whitespace = true # No trailing whitespaces
17+
18+
[Makefile]
19+
indent_style = tab
20+
tab_width = 4
21+
22+
[{*.py,ns3}]
23+
indent_style = space
24+
indent_size = 4
25+
26+
[*.{cc,h}]
27+
indent_style = space
28+
indent_size = 4
29+
30+
[{CMakeLists.txt,*.cmake}]
31+
indent_style = space
32+
indent_size = 2
33+
34+
[*.yml]
35+
indent_style = space
36+
indent_size = 2

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
*.diff
2+
*.orig
3+
*.patch
4+
*.rej
5+
6+
*.o
7+
*.pyc
8+
*.pyo
9+
10+
*.cwnd
11+
*.dat
12+
*.log
13+
*.mob
14+
*.pcap
15+
*.plt
16+
*.routes
17+
*.tr
18+
[D|U]l[A-Z][a-z]*Stats.txt
19+
20+
\#*#
21+
*~
22+
23+
testpy-output
24+
25+
bindings/python/pybindgen/
26+
27+
ms_print.*
28+
massif.*
29+
coverity
30+
TAGS
31+
32+
.lock-ns3_*
33+
34+
build-dir/
35+
build/
36+
/.cproject
37+
/.project
38+
39+
version.cache
40+
41+
.gitlab-ci-local/
42+
.idea/
43+
cmake-cache/
44+
cmake-build-debug/
45+
cmake-build-relwithdebinfo/
46+
cmake-build-minsizerel/
47+
cmake-build-release/
48+
49+
.vs/
50+
51+
# Ignore local cache used by e.g. clangd
52+
.cache/

.vscode/launch.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "(gdb) Launch from scratch",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-default",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${workspaceFolder}",
15+
"preLaunchTask": "Build",
16+
"environment": [
17+
{
18+
"name": "LD_LIBRARY_PATH",
19+
"value": "${workspaceFolder}/build/lib/"
20+
}
21+
],
22+
"externalConsole": false,
23+
"MIMode": "gdb",
24+
"setupCommands": [
25+
{
26+
"description": "Enable pretty-printing for gdb",
27+
"text": "-enable-pretty-printing",
28+
"ignoreFailures": true
29+
}
30+
]
31+
},
32+
{
33+
"name": "(lldb) Launch from scratch",
34+
"type": "cppdbg",
35+
"request": "launch",
36+
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-default",
37+
"args": [],
38+
"stopAtEntry": false,
39+
"cwd": "${workspaceFolder}",
40+
"preLaunchTask": "Build",
41+
"environment": [
42+
{
43+
"name": "LD_LIBRARY_PATH",
44+
"value": "${workspaceFolder}/build/lib/"
45+
}
46+
],
47+
"externalConsole": false,
48+
"MIMode": "lldb"
49+
},
50+
{
51+
"name": "(gdb) Launch testrunner",
52+
"type": "cppdbg",
53+
"request": "launch",
54+
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-debug",
55+
"args": [
56+
"--suite=${selectedText}"
57+
],
58+
"stopAtEntry": false,
59+
"cwd": "${workspaceFolder}",
60+
"preLaunchTask": "Build",
61+
"environment": [
62+
{
63+
"name": "LD_LIBRARY_PATH",
64+
"value": "${workspaceFolder}/build/lib/"
65+
}
66+
],
67+
"externalConsole": false,
68+
"MIMode": "gdb",
69+
"setupCommands": [
70+
{
71+
"description": "Enable pretty-printing for gdb",
72+
"text": "-enable-pretty-printing",
73+
"ignoreFailures": true
74+
}
75+
]
76+
},
77+
{
78+
"name": "(lldb) Launch testrunner",
79+
"type": "cppdbg",
80+
"request": "launch",
81+
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-debug",
82+
"args": [
83+
"--suite=${selectedText}"
84+
],
85+
"stopAtEntry": false,
86+
"cwd": "${workspaceFolder}",
87+
"preLaunchTask": "Build",
88+
"environment": [
89+
{
90+
"name": "LD_LIBRARY_PATH",
91+
"value": "${workspaceFolder}/build/lib/"
92+
}
93+
],
94+
"externalConsole": false,
95+
"MIMode": "lldb"
96+
}
97+
]
98+
}

.vscode/tasks.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build",
8+
"type": "shell",
9+
"command": "./ns3",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
}
14+
},
15+
{
16+
"label": "Run tests",
17+
"type": "shell",
18+
"command": "./test.py",
19+
"group": {
20+
"kind": "test",
21+
"isDefault": true
22+
}
23+
}
24+
]
25+
}

0 commit comments

Comments
 (0)