This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 101
Add libevent support #83
Open
pprindeville
wants to merge
9
commits into
kravietz:master
Choose a base branch
from
pprindeville:add-libevent-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This should go in after PR #78. |
pprindeville
force-pushed
the
add-libevent-support
branch
2 times, most recently
from
December 13, 2016 03:31
06b8624
to
5e94472
Compare
Derive the authentication type from tac_login string
It's precursory to separate marshalling functions from I/O if event-driven I/O is to be done, or if multiple Tacacs+ sessions can be active at the same time (you don't want to be polling on one socket and miss a timeout on another).
Unnecessary casts are a blight in that they mask possible programming errors. We shouldn't use them where they aren't required. Also, add a convenience function to convert a header pointer to a body pointer by adding the correct offset.
If you're connecting to multiple servers simultaneously, then per-server parameters can't be globals. Move them into a session container. Note: this obviously has API and ABI compatibility implications.
As this is obviously related to the session.
Let the connections to servers be event-driven by libevent.
pprindeville
force-pushed
the
add-libevent-support
branch
from
December 21, 2016 03:19
5e94472
to
740707a
Compare
Add method for setting whether session is multiplexed or not; mark packet header flags appropriately; reset timeouts on connection when we have received a response (since our request has been answered, no more data will be read or written for now).
A session is 'busy' when a request has been sent, and the response not yet received. As soon as the response is received, the session re-enters the 'idle' state (and any associated read timeouts can be cleared). We also clear timeouts when a session enters connected state, but only if we hadn't pre-queued the first request.
pprindeville
force-pushed
the
add-libevent-support
branch
from
December 21, 2016 03:25
740707a
to
6e830d1
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Let the connections to servers be event-driven by libevent.