Using the --sport option will set a static port for the trap adapter service.
Command line execution of the trap adapter command.
./sm_trapd --name=TRAP_OI --server=INCHARGE-OI --output --config=icoi --port=162 --sport=42000 --daemon --model=sm_actions --rules=icoi-trapd/trap_mgr_parse.asl --errlevel=Warning
Example of the sm_service install command for the trap adapter.
If the trap adapter is already running as a service command.
sm_service install --force --unmanaged --startmode=runonce \
'--name=ic-trapd-receiver' \
'--description=VMware Smart Assurance SNMP Trap Adapter' \
'/opt/InCharge/SAM/smarts/bin/sm_trapd' \
'--name=TRAP-INCHARGE-OI' \
'--server=INCHARGE-OI' \
'--config=icoi' \
'--port=162' \
'--sport=42000' \
'--model=sm_actions' \
'--rules=icoi-trapd/trap_mgr_parse.asl' \
'--seed=seedfile' \
'--output=TRAP-INCHARGE-OI.log'