Skip to content

feat: state the device's own address in origin.ip - #12

Merged
DavidCozens merged 1 commit into
mainfrom
stage-12-origin-ip
Aug 16, 2026
Merged

feat: state the device's own address in origin.ip#12
DavidCozens merged 1 commit into
mainfrom
stage-12-origin-ip

Conversation

@DavidCozens

Copy link
Copy Markdown
Contributor

Add the ip PARAM to the origin element, sourced from the same interface address the HOSTNAME field
reports.

struct SolidSyslogOriginSdConfig originConfig = {
    /* ... as the previous stage ... */
    .GetIpCount = SyslogOriginIpCount,
    .GetIpAt    = SyslogOriginIpAt,
};
... [origin software="solid-syslog-example" swVersion="0.1.0" enterpriseId="32473" ip="10.0.2.15"] device started

A relay or NAT between the device and the collector rewrites the address the collector observes.
ip is what the device says about itself, and that survives the hop.

The PARAM is repeatable, so the library asks for a count and then one value per index rather than
taking a single string. This device has one address and returns one, and returns none before the
interface has an address — a count of zero omits the PARAM rather than emitting an empty one.

SyslogFields_IpAddress becomes the single place that reads the address, and HOSTNAME formats the
same string through it. Two fields that must agree now cannot disagree.

When you need it. If anything sits between the device and the collector — a relay, a gateway, or
NAT — and the source address the collector sees can no longer be trusted to identify the device.

@DavidCozens

Copy link
Copy Markdown
Contributor Author

@coderabbitai pause

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0230c70d-140b-4947-9cf8-d9359717d6cb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews paused.

The ip PARAM, sourced from the same interface address HOSTNAME reports. A relay
or NAT between device and collector rewrites what the collector observes; ip is
what the device says about itself, which survives the hop.

  Flash      +12,396 B  (+408 on the previous stage)
  RAM         +9,168 B  (unchanged)
  Log stack     +680 B        (+8)
  Service       +960 B  (unchanged)

ip is repeatable, so the library asks for a count and then one value per index
rather than taking a string. This device has one address and returns one, and
none before the interface has an address — a count of zero omits the PARAM rather
than emitting an empty one.

SyslogFields_IpAddress is now the single place that reads the address, and
HOSTNAME formats the same string through it, so two fields that must agree cannot
disagree.

Four elements put the record at 260 octets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@DavidCozens
DavidCozens changed the base branch from stage-11-origin to main August 16, 2026 21:50
@DavidCozens
DavidCozens merged commit dcc8d39 into main Aug 16, 2026
1 check passed
@DavidCozens
DavidCozens deleted the stage-12-origin-ip branch August 16, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant