Nevertheless, I received several requests for answers, so here's a summary. The short answer appears that Odds Ratios can be computed by logistic regression and Relative Risks by Cox Proportional Hazards regression. Odds ratios are computed by logistic regression Relative risks are computed by Cox Proportional Hazards regression. That would be one way. Often, odds ratios are calculated after modelling a logistic regression.
Logistic regression is a special case of generalized linear models.