Added arguments to bacepics which let you specify a source port to use (besides 0xBAC0) and a target MAC to use.

Combining these lets you run bacepics against the localhost's Device at port 0xBAC0.
One small change in dlenv_init() to support this (don't force source port to 0xBAC0 if that's not what we want).
This commit is contained in:
tbrennan3
2010-05-14 19:09:53 +00:00
parent c69686c99b
commit 1526557b54
3 changed files with 87 additions and 16 deletions
+8 -1
View File
@@ -92,7 +92,14 @@ void dlenv_init(
if (pEnv) {
bip_set_port((uint16_t)strtol(pEnv, NULL, 0));
} else {
bip_set_port(0xBAC0);
/* BIP_Port is statically initialized to 0xBAC0,
* so if it is different, then it was programmatically altered,
* and we shouldn't just stomp on it here.
* Unless it is set below 1024, since:
* "The range for well-known ports managed by the IANA is 0-1023."
*/
if ( bip_get_port() < 1024 )
bip_set_port(0xBAC0);
}
#elif defined(BACDL_MSTP)
pEnv = getenv("BACNET_MAX_INFO_FRAMES");