Harald Welte
d5db12c160
Use new include paths of libosmo-sccp 0.0.2
2010-08-03 15:11:51 +02:00
Holger Hans Peter Freyther
c2b31ed9cd
nat: Fix compilation with nat not being enabled.
...
common_vty.c was including bsc_nat.h which tried to
get the sccp/sccp_types.h which is not required to be
installed. Move all structs using/embedding SCCP structures
into the bsc_nat_sccp.h and include. This should fix
the compilation.
2010-07-31 05:20:31 +08:00
Holger Hans Peter Freyther
6b7710739a
nat: Rename ip-tos to ip-dscp and provide an alias...
2010-07-27 19:21:53 +08:00
Holger Hans Peter Freyther
f21e453dc9
nat: Provide an easy view to see if something is connected to the NAT.
2010-07-22 20:37:35 +08:00
Holger Hans Peter Freyther
c95cfda58d
nat: Introduce a show statistics-by-lac LAC
...
Currently show show statistics only work by given the internal
configuration number, add a version that is working by LAC of
the BSC.
2010-07-22 20:26:10 +08:00
Holger Hans Peter Freyther
b2c38ebb1f
nat: Switch per BSC counters to the rate ctr.
...
This is switching the simple statistics to the rate counter
and is updating all users...
2010-06-17 18:18:12 +08:00
Holger Hans Peter Freyther
7b4a53d537
nat: Rename BSC_NODE to NAT_BSC_NODE to avoid future issues.
2010-06-17 14:42:20 +08:00
Holger Hans Peter Freyther
9c78697fa2
nat: Add the exit/end command to the NAT config nodes.
2010-06-17 14:39:15 +08:00
Holger Hans Peter Freyther
1398f13a64
nat: Attempt to update the VTY usage to the latest version
...
* Install the show commands to be available in the enable mode as well
* Provide a copyright header..
2010-06-15 20:31:35 +08:00
Holger Hans Peter Freyther
27d36de3b9
nat: Fix the access-list-name command...
...
We have added two commands with the same name to the tree..
the second one should have been the BSC...
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
d77c8171aa
nat: Allow to specify multiple entries in the access-list...
...
Inside the access-list we have a list of entries that have
either one allow or one deny rule... we do not allow to remove
a single rule but one has to remove the whole list, in that case
talloc will handle cleaning all entries.
Right now the matching is O(n*m) as we traverse the list
(multiple times) and run the regexp multiple times. One
way to make it faster would be to concat all regexps into
one.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
29c67039fe
nat: Shorten the access-list struct and method names (still way too long)
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
e4900a074a
[nat] Implement the removal of an access-list.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
f0c3e912e3
[nat] Fix the parsing of the access-list regexp...
...
We need to start at argv[1] for the regexp of
this access-list, also subtract one from number
of items..
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
86c4dc3a0e
[nat] Fix VTY bug with access-lists...
...
vty->index does not hold a BSC Config at this point as we are
on the nat level... use the global _nat pointer for now...
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
8affef5059
[nat] Introduce the concept of access-list
...
One can set one access-list to one BSC and one
access-list to one NAT. The matching of IMSIs
remains the same for now, also applying the
white/blacklist. Access lists can not be deleted
for now and no perf opt is done (e.g. one could
cache the result of the last lookup in the bsc
struct).
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
078321aaae
[nat] Add ip-tos option to the nat.
...
This is applied to all incoming BSC connections.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
234d31218f
[nat] Use and print the connection type of a SCCP connection.
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
f1012a432c
[nat] Remove the imsi allow option on the nat level.
...
For now we have:
1.) bsc imsi deny to deny at the BSC level
2.) bsc imsi allow to allow a SIM at the BSC level
3.) nat imsi deny to deny at the global level
2010-06-15 20:24:19 +08:00
Holger Hans Peter Freyther
e635dab52f
[nat] Add a token to the nat config and handle ID GET
...
This allows to chain a nat with a nat by answering to the
id get code and sending the token.
2010-06-15 20:24:19 +08:00
Holger Hans Peter Freyther
52c4ba0309
[nat] Add a regexp test command to the VTY.
...
This allows to test the regexp to be used for allo/deny of
the imsi filter.
2010-06-15 20:24:19 +08:00
Holger Hans Peter Freyther
3df0233e5d
[nat] Fix the imsi deny config write.
2010-06-15 20:24:19 +08:00
Holger Hans Peter Freyther
b606101011
[nat] Allow to set the description for the bsc.
...
This will allow to add description to each BSC.
2010-06-15 20:24:19 +08:00
Holger Hans Peter Freyther
12dc89ad37
[nat] Make the string -> regexp parsing public
...
This way it can be used from within a test case to test
the regexps..
2010-06-15 20:24:18 +08:00
Holger Hans Peter Freyther
d8b82066fa
[nat] Use A.B.C.D for the IP address
...
The VTY code will then be able to validate the IP Address.
2010-06-15 20:24:18 +08:00
Holger Hans Peter Freyther
c89c030b10
[nat] Remove range checks inside the VTY command.
...
The ranges are enforced by the VTY code.
2010-06-15 20:24:18 +08:00
Holger Hans Peter Freyther
aad82ce7ea
nat: Print the MSC status with a new vty command.
2010-06-15 20:24:18 +08:00
Holger Hans Peter Freyther
da35a8da7f
nat: Make ping/pong timeout configurable.
2010-06-15 20:24:17 +08:00
Holger Hans Peter Freyther
314191d75a
nat: Allow to only show statistics for a given BSC Cfg.
2010-06-15 20:24:17 +08:00
Holger Hans Peter Freyther
3b8798184b
nat: Fix vty output for connected BSCs
2010-06-15 20:24:17 +08:00
Holger Hans Peter Freyther
b9af2fae51
nat: Do not use \n in the vty code.
...
When we really need a newline we need to use VTY_NEWLINE.
2010-06-15 20:24:17 +08:00
Holger Hans Peter Freyther
2f9dcf0670
nat: Add a command to close a given BSC Connection
...
This can be used to clear stale connections for a given BSC
or to force a reconnect of the BSC.
2010-06-15 20:24:17 +08:00
Holger Hans Peter Freyther
4bd2294492
nat: Print the remote reference as well.
2010-06-15 20:24:16 +08:00
Holger Hans Peter Freyther
ab7539cc89
nat: Use show bsc config for showing the configuration.
2010-06-15 20:24:16 +08:00
Holger Hans Peter Freyther
834f1df21e
[nat] Fix the vty option... use the right argument.
2010-06-15 20:24:15 +08:00
Holger Hans Peter Freyther
62e5843a61
[nat] Add option to forbid the paging to the BSC.
...
This can be done for testing purposes and to allow making
a BTS crash that can not handle paging requests properly.
2010-06-15 20:24:15 +08:00
Holger Hans Peter Freyther
01a0b1b2e0
nat: Make sccp/bsc show connections more Cisco like...
...
Second attempt to use a syntax more comparable to 'Cisco',
I have never used such a system... let us see how this is
going.
2010-06-15 20:24:15 +08:00
Holger Freyther
d6b616a388
nat: Remove the SHOW_STR from none show commands.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
8139553962
nat: Make the MSC configurable.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
a88742cf5e
nat: Move MSC ip address into the config..
...
The address can still be specified on the cli and it will
overwrite the config in the config file.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
d1278c1fc9
nat: Two fixes for the write memory case...
...
Add new BSCs to the tail so we keep the sort order when writing
them out to the vty, fix the LAC command.
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
c16cf27bd5
nat: Add config option to filter/handle certain imsi'es.
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
bcfebb2c1d
[nat] Add show statistics to the nat
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
57f874ad8d
[nat] Change the command strings
...
Put the Target/Object first... Apparently this is more what people
that know IOS expect to do.
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
870663af20
nat: Print the IP address of the connected BSCs
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
47dd4944ae
nat: Store the config in the connection instead of the lac
...
This allows that we can print the Nr. next to the lac
and it allows us to change the lac at runtime without
reconnecting the BSC.
2010-06-15 20:24:12 +08:00
Holger Hans Peter Freyther
5f291d5077
nat: Add logging commands for the nat as well.
2010-06-15 20:24:12 +08:00
Holger Hans Peter Freyther
560af50422
nat: Print the SCCP ref's as hex numbers
...
This allows to more easily compare the numbers with traces
seen in wireshark.
2010-06-15 20:24:11 +08:00
Holger Hans Peter Freyther
32d343644d
nat: Print the MSC multiplex as well
2010-06-15 20:24:11 +08:00
Holger Hans Peter Freyther
f7d3335817
nat: Add MGCP code and parsing to the nat code..
...
For the nat we will have NAT and MGCP in the same process
and this commit starts with that. We are linking in the MGCP
code and one can embed MGCP config snippets...
2010-06-15 20:24:09 +08:00