nmrp-flash -> nmrpflash

This commit is contained in:
Joseph C. Lehner 2016-02-08 16:18:21 +01:00
parent d94e849b16
commit 904a81b50e
9 changed files with 42 additions and 43 deletions

View file

@ -5,8 +5,8 @@ LIBS = -lpcap
.PHONY: clean install release release/osx release/linux
nmrp-flash: nmrp.o tftp.o ethsock.o main.o
$(CC) $(CFLAGS) -o nmrp-flash nmrp.o tftp.o ethsock.o main.o $(LIBS)
nmrpflash: nmrp.o tftp.o ethsock.o main.o
$(CC) $(CFLAGS) -o nmrpflash nmrp.o tftp.o ethsock.o main.o $(LIBS)
nmrp.o: nmrp.c nmrpd.h
$(CC) $(CFLAGS) -c -o nmrp.o nmrp.c
@ -21,17 +21,16 @@ main.o: main.c nmrpd.h
$(CC) $(CFLAGS) -c -o main.o main.c
clean:
rm -f nmrp.o tftp.o main.o ethsock.o nmrp-flash nmrp-flash.exe
rm -f nmrp.o tftp.o main.o ethsock.o nmrpflash nmrpflash.exe
install: nmrp-flash
install -m 755 nmrp-flash $(PREFIX)/bin
install: nmrpflash
install -m 755 nmrpflash $(PREFIX)/bin
release/osx:
CFLAGS="-arch i686 -arch x86_64" make release
cp nmrp-flash binaries/osx/
release/linux: release
cp nmrp-flash binaries/linux/
cp nmrpflash binaries/linux/
release: clean nmrp-flash
strip nmrp-flash
release: clean nmrpflash
strip nmrpflash

View file

@ -1,4 +1,4 @@
nmrp-flash - Netgear Unbrick Utility
nmrpflash - Netgear Unbrick Utility
====================================
This program uses Netgear's [NMRP protocol]
@ -6,7 +6,7 @@ This program uses Netgear's [NMRP protocol]
to flash a new firmware image to a compatible device. This utility has been
tested with a Netgear EX2700, but is likely to work on many others as well.
### Using nmrp-flash
### Using nmrpflash
Connect your Netgear router to your computer using a network cable.
Assign a static IP address to your computer (more specifically, to
@ -19,17 +19,17 @@ In this example, we'll use `192.168.1.2`. All available network interfaces
can be listed using
````
$ nmrp-flash -L
$ nmrpflash -L
eth0 192.168.1.2 f2:11:a1:02:03:b1
````
Now we can start `nmrp-flash`. The argument for the `-a` option needs
Now we can start `nmrpflash`. The argument for the `-a` option needs
to be a *free* IP address from the same subnet as the one used by your
network interface. We'll use `192.168.1.254`. The firmware image file
can usually be downloaded directly from Netgear's FTP servers.
````
$ nmrp-flash -i eth0 -a 192.168.1.254 -f EX2700-V1.0.1.8.img
$ nmrpflash -i eth0 -a 192.168.1.254 -f EX2700-V1.0.1.8.img
Advertising NMRP server on eth0 ... /
Received configuration request from a4:2b:8c:00:00:01.
Sending configuration: ip 192.168.1.254, mask 255.255.255.0.
@ -49,7 +49,7 @@ $ make && sudo make install
The repository includes a
[DevCpp](http://sourceforge.net/projects/orwelldevcpp/)
project file (`nmrp-flash.dev`). Download the latest
project file (`nmrpflash.dev`). Download the latest
[WinPcap Developer Pack](http://www.winpcap.org/devel.htm)
and extract it into the root folder of the nmrp-flash sources.
and extract it into the root folder of the nmrpflash sources.

Binary file not shown.

Binary file not shown.

22
main.c
View file

@ -1,19 +1,19 @@
/**
* nmrp-flash - Netgear Unbrick Utility
* nmrpflash - Netgear Unbrick Utility
* Copyright (C) 2016 Joseph Lehner <joseph.c.lehner@gmail.com>
*
* nmrp-flash is free software: you can redistribute it and/or modify
* nmrpflash is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nmrp-flash is distributed in the hope that it will be useful,
* nmrpflash is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with nmrp-flash. If not, see <http://www.gnu.org/licenses/>.
* along with nmrpflash. If not, see <http://www.gnu.org/licenses/>.
*
*/
@ -30,7 +30,7 @@ int verbosity = 0;
void usage(FILE *fp)
{
fprintf(fp,
"Usage: nmrp-flash [OPTIONS...]\n"
"Usage: nmrpflash [OPTIONS...]\n"
"\n"
"Options (-a, -i and -f are mandatory):\n"
" -a <ipaddr> IP address to assign to target device\n"
@ -52,14 +52,14 @@ void usage(FILE *fp)
"Example:\n"
"\n"
#ifndef NMRPFLASH_WINDOWS
"$ sudo nmrp-flash -i eth0 -a 192.168.1.254 -f firmware.bin\n"
"$ sudo nmrpflash -i eth0 -a 192.168.1.254 -f firmware.bin\n"
#else
"C:\\> nmrp-flash.exe -i net0 -a 192.168.1.254 -f firmware.bin\n"
"C:\\> nmrpflash.exe -i net0 -a 192.168.1.254 -f firmware.bin\n"
#endif
"\n"
"nmrp-flash %s, Copyright (C) 2016 Joseph C. Lehner\n"
"nmrp-flash is free software, licensed under the GNU GPLv3.\n"
"Source code at https://github.com/jclehner/nmrp-flash\n"
"nmrpflash %s, Copyright (C) 2016 Joseph C. Lehner\n"
"nmrpflash is free software, licensed under the GNU GPLv3.\n"
"Source code at https://github.com/jclehner/nmrpflash\n"
"\n",
NMRPFLASH_VERSION
);
@ -131,7 +131,7 @@ int main(int argc, char **argv)
break;
case 'V':
printf("nmrp-flash %s\n", NMRPFLASH_VERSION);
printf("nmrpflash %s\n", NMRPFLASH_VERSION);
val = 0;
goto out;
case 'v':

View file

@ -1,6 +1,6 @@
[Project]
FileName=nmrp-flash.dev
Name=nmrp-flash
FileName=nmrpflash.dev
Name=nmrpflash
Type=1
Ver=2
ObjFiles=
@ -19,7 +19,7 @@ ObjectOutput=Obj
LogOutput=
LogOutputEnabled=0
OverrideOutput=0
OverrideOutputName=nmrp-flash.exe
OverrideOutputName=nmrpflash.exe
HostApplication=
UseCustomMakefile=0
CustomMakefile=

8
nmrp.c
View file

@ -1,19 +1,19 @@
/**
* nmrp-flash - Netgear Unbrick Utility
* nmrpflash - Netgear Unbrick Utility
* Copyright (C) 2016 Joseph Lehner <joseph.c.lehner@gmail.com>
*
* nmrp-flash is free software: you can redistribute it and/or modify
* nmrpflash is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nmrp-flash is distributed in the hope that it will be useful,
* nmrpflash is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with nmrp-flash. If not, see <http://www.gnu.org/licenses/>.
* along with nmrpflash. If not, see <http://www.gnu.org/licenses/>.
*
*/

10
nmrpd.h
View file

@ -1,19 +1,19 @@
/**
* nmrp-flash - Netgear Unbrick Utility
* nmrpflash - Netgear Unbrick Utility
* Copyright (C) 2016 Joseph Lehner <joseph.c.lehner@gmail.com>
*
* nmrp-flash is free software: you can redistribute it and/or modify
* nmrpflash is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nmrp-flash is distributed in the hope that it will be useful,
* nmrpflash is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with nmrp-flash. If not, see <http://www.gnu.org/licenses/>.
* along with nmrpflash. If not, see <http://www.gnu.org/licenses/>.
*
*/
@ -30,7 +30,7 @@
#define NMRPFLASH_OSX
#elif defined(__unix__)
#define NMRPFLASH_UNIX
#warning "nmrp-flash is not fully supported on your operating system"
#warning "nmrpflash is not fully supported on your operating system"
#endif
#ifndef NMRPFLASH_WINDOWS

8
tftp.c
View file

@ -1,19 +1,19 @@
/**
* nmrp-flash - Netgear Unbrick Utility
* nmrpflash - Netgear Unbrick Utility
* Copyright (C) 2016 Joseph Lehner <joseph.c.lehner@gmail.com>
*
* nmrp-flash is free software: you can redistribute it and/or modify
* nmrpflash is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nmrp-flash is distributed in the hope that it will be useful,
* nmrpflash is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with nmrp-flash. If not, see <http://www.gnu.org/licenses/>.
* along with nmrpflash. If not, see <http://www.gnu.org/licenses/>.
*
*/