Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Starting with the Development
« previous
next »
Print
Pages: [
1
]
Author
Topic: Starting with the Development (Read 4326 times)
kelvin1997
Newbie
Posts: 8
Karma: 0
Starting with the Development
«
on:
April 04, 2016, 04:42:41 am »
MY BACKGROUND
is that I am a .net programmer, good with major js libs, all sorts of patterns, done 2t, 3t projects, can do PHP on IIS. I know little about Perl and BSD. But I believe once I get over the initial environment barriers I can pick up quickly, I am willing to learn. So here I am!
MY GOALl
is to replicate a speed limiter like this
https://forum.pfsense.org/index.php?topic=68865.0
. It has been written, so I don't have to start from scratch. It can be done the similar way as Hello World sample. It will end up being useful as it is one of the *Most Wanted* features.
MY BARRIERS
are:
How to setup a debuggable development environment? What debugger/method do we use?
Where to find a list of available functions in API? Which folders/docs/links to look into?
How to link my Perl code with the Hello World code? Sample to make Perl and PHP talking to each other?
Please throw me any development experience, help me to kick start my project
Appreciated!
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Starting with the Development
«
Reply #1 on:
April 08, 2016, 08:07:43 am »
Hi there,
Sorry, I missed this before.
PHP knowledge is good, very good. Basically for OPNsense you need a VM or hardware machine you want to work with, on that you install:
# pkg install git vim-lite
(or nano or joe for editing or get the files onto the box in any way you want)
# cd && git clone
https://github.com/opnsense/core
# cd core
# make mount
The last command overlays the git onto the system, and you can start working on the code in the src/ dir.
I wrote a tutorial (a bit outdated) about how it works...
http://lastsummer.de/development-workflow-in-opnsense/
More docs you'll need:
https://docs.opnsense.org/develop.html
Binding scripts or binaries to the MVC code is done via configd backend handling. You can then call this from the MVC. We can talk about this step by step as you need it.
PS: Even though Perl works, consider using Python instead.
We will have to make sure the license is ok. A clean rewrite is usually the way to do it.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Starting with the Development